Segments
Get All Segments
GET https://api.bigcommerce.com/stores/{store_hash}/v3/segmentsRequest
Returns a paginated Segments List.
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.
- page in query - integer
Page number.
- limit in query - integer
Items count per page.
- id:in in query - array
Comma separated IDs.
Type: array[string]
example
curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/segments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
Body
object | application/json
Response payload for the BigCommerce API.
dataarray[object]
example
{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "My Segment",
"description": "Description",
"created_at": "2022-09-15T23:44:05Z",
"updated_at": "2022-09-15T23:44:05Z"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 50,
"current_page": 1,
"total_pages": 1
}
}
}
Create Segments
POST https://api.bigcommerce.com/stores/{store_hash}/v3/segmentsRequest
Creates Segments.
Limits
- 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.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
array | application/json
Request payload for the BigCommerce API.
namestring
requiredName of the segmentExample: My Segmentdescriptionstring
Description of the segmentExample: Description
example
[
{
"name": "My Segment",
"description": "Description"
}
]
Response
| An array of created Segments.
Body
object | application/json
Response payload for the BigCommerce API.
dataarray[object]
example
{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "My Segment",
"description": "Description",
"created_at": "2022-09-15T23:44:05Z",
"updated_at": "2022-09-15T23:44:05Z"
}
],
"meta": {}
}
Update Segments
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/segmentsRequest
Updates Segments.
Limits
- 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.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
array | application/json
Request payload for the BigCommerce API.
idstring
requiredID of the segment.namestring
Name of the segment.Example: My Segmentdescriptionstring
Description of the segment.Example: Description
example
[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "My Segment",
"description": "Description"
}
]
Response
An array of created Segments.
Body
object | application/json
Response payload for the BigCommerce API.
dataarray[object]
example
{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "My Segment",
"description": "Description",
"created_at": "2022-09-15T23:44:05Z",
"updated_at": "2022-09-15T23:44:05Z"
}
],
"meta": {}
}
Delete Segments
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/segmentsRequest
Deletes one or more Segments from a store. This will not delete any associated 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.
- 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' \
--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?