Skip to main content

Get a segment

GET /v2/marketing/segments/{segment_id}

Returns a single segment by its ID. The response includes the segment's segment_id, name, and description.

Supply the segment_id of the membership segment you want to retrieve as a path parameter. To find the available segment IDs, use List segments.

Security​

NameInDescription
AuthorizationheaderThe Authorization header with the client bearer token acquired during authentication.

For more information, see Get a client access token.

Parameters​

NameInTypeRequiredDescription
segment_idpathstringRequired

The ID of the segment.

Request​

None.

Request examples​

curl --request GET \
--url 'https://connect.instacart.com/v2/marketing/segments/{segment_id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'

Response​

FieldTypeRequiredDescription
segment_idstringOptional

The unique ID of the segment.

namestringOptional

The display name of the segment.

descriptionstringOptional

A human-readable description of the segment.

Response examples​

200 Success

{
"segment_id": "f87414d7-1836-4b5c-84b5-6efeb2406a18",
"name": "Loyalists",
"description": "Top spenders"
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Missing segment_id"segment_id is required"1001{"key":"segment_id"}
401Unauthorized"Unauthorized"nullNot applicable
403Forbidden"Forbidden"nullNot applicable
404Not found"segment not found"4000Not applicable