Shopper Profiles for a Segment
Get All Shopper Profiles in a Segment
GET https://api.bigcommerce.com/stores/{store_hash}/v3/segments/{segmentId}/shopper-profilesRequest
Returns a list of Shopper Profiles that are associated with a given Segment.
NOTE: The modify
Customers OAuth scope is a requirement for this endpoint.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- segmentId in path - stringrequiredThe Segment ID.
- page in query - integer
Page number.
- limit in query - integer
Items count per page.
example
curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/segments/[segmentId]/shopper-profiles' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
An array of Shopper Profiles objects and metadata.
Body
object | application/json
dataarray[object]
example
{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"customer_id": 1,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 50,
"current_page": 1,
"total_pages": 1
}
}
}
Add Shopper Profiles to a Segment
POST https://api.bigcommerce.com/stores/{store_hash}/v3/segments/{segmentId}/shopper-profilesRequest
Add Shopper Profiles to a specific Segment.
Limits
- Limit of Shopper Profiles per request is
50
. - Limit of 10 concurrent requests.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- segmentId in path - stringrequiredThe Segment ID.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
array | application/json
A list of Shopper Profiles to associate with the segment.
example
[
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
Response
An array of Shopper Profiles added to a Segment.
Body
object | application/json
dataarray[object]
example
{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"customer_id": 1,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}
Remove Shopper Profiles from a Segment
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/segments/{segmentId}/shopper-profilesRequest
Remove one or more Shopper Profiles that are associated with a Segment. This operation only removes the association; it doesn't delete the Shopper Profiles.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- segmentId in path - stringrequiredThe Segment ID.
- id:in in query - array
Comma separated IDs.
Type: array[string]
example
curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/segments/[segmentId]/shopper-profiles' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
An empty response.
Did you find what you were looking for?