Struct sendgrid_api::segmenting_contacts::SegmentingContacts[][src]

pub struct SegmentingContacts {
    pub client: Client,
}

Fields

client: Client

Implementations

Get List of Segments.

This function performs a GET to the /marketing/segments endpoint.

This endpoint allows you to retrieve a list of segments.

The query param parent_list_ids is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty results array.

parent_list_idsno_parent_list_idresult
emptyfalseall segments
valuesfalsesegments filtered by list_ids
valuestruesegments filtered by list_ids and segments with no parent list_ids
emptytruesegments with no parent list_ids

Parameters:

  • parent_list_ids: &str – A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed.
  • no_parent_list_id: bool – If set to true segments with an empty value of parent_list_id will be returned in the filter. If the value is not present it defaults to ‘false’.

Create Segment.

This function performs a POST to the /marketing/segments endpoint.

This endpoint allows you to create a segment.

Get Segment by ID.

This function performs a GET to the /marketing/segments/{segment_id} endpoint.

This endpoint allows you to retrieve a single segment by ID.

Parameters:

  • query_json: bool – Defaults to false. Set to true to return the parsed SQL AST as a JSON object in the field query_json.

Delete Segment.

This function performs a DELETE to the /marketing/segments/{segment_id} endpoint.

This endpoint allows you to delete a segment by segment_id.

Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to.

Update Segment.

This function performs a PATCH to the /marketing/segments/{segment_id} endpoint.

This endpoint allows you to update a segment.

Segment name needs to be unique. A user can not update a segment name to an existing one.

Bulk Delete Segments.

This function performs a POST to the /marketing/segments/delete endpoint.

This endpoint allows you to delete segments in bulk.

If the segments are used by automations or the segments do not exist in the database, the segment IDs that could not be deleted along with automation IDs that are associated to those segments will be returned.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.