Price Lists Assignments
Get Price List Assignments
GET https://api.bigcommerce.com/stores/{store_hash}/v3/pricelists/assignmentsRequest
Fetches an array of
Price List Assignments
matching a particular Customer Group and Price List and Channel.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 query - integerThe ID of the
Price List Assignment
. - price_list_id in query - integerThe ID of the
Price List
. - customer_group_id in query - integerThe ID of the
Customer Group
. - channel_id in query - integerThe ID of the
Channel
. - id:in in query - arrayFilter items by a comma-separated list of IDs.Type: array[integer]
- customer_group_id:in in query - arrayFilter items by a comma-separated list of customer group IDs.Type: array[integer]
- price_list_id:in in query - arrayFilter items by a comma-separated list of price list IDs.Type: array[integer]
- channel_id:in in query - arrayFilter items by a comma-separated list of channel IDs.Type: array[integer]
- page in query - integerSpecifies the page number in a limited (paginated) list of products.
- limit in query - integerControls the number of items per page in a limited (paginated) list of products. If you provide only a limit, the API returns both paginations while applying that limit.
- before in query - stringA cursor that can be used for backwards pagination. Will fetch results before the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'after' query parameter.
- after in query - stringA cursor that can be used for forwards pagination. Will fetch results after the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'before' query parameter.
example
curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/pricelists/assignments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
An array of price list assignments and metadata.
Body
object | application/json
Array of the price list assignments matching the filter. The response is paginated.
dataarray[object]
example
{
"data": [
{
"id": 1,
"price_list_id": 1,
"customer_group_id": 2,
"channel_id": 2
}
],
"meta": {
"pagination": {
"total": 36,
"count": 36,
"per_page": 50,
"current_page": 1,
"total_pages": 1
},
"cursor_pagination": {
"count": 0,
"per_page": 0,
"start_cursor": "string",
"end_cursor": "string",
"links": {
"previous": "string",
"current": "string",
"next": "string"
}
}
}
}
Create Price List Assignments
POST https://api.bigcommerce.com/stores/{store_hash}/v3/pricelists/assignmentsRequest
Creates a batch of Price List Assignments
.
Note: The batch limit for Price List Assignments
is 25.
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
Batch of price list assignments.
price_list_idinteger
requiredPrice list ID for assignment.Example: 1customer_group_idinteger
Customer group ID for assignment.Example: 2channel_idinteger
Channel ID for assignmentExample: 1
example
[
{
"price_list_id": 1,
"customer_group_id": 2,
"channel_id": 1
}
]
Response
No content
Delete Price List Assignments
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/pricelists/assignmentsRequest
Deletes one or more
Price List Assignments
objects from BigCommerce using a query parameter. You must use at least one query parameter. 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 query - integerThe ID of the
Price List Assignment
. - price_list_id in query - integerThe ID of the
Price List
. - customer_group_id in query - integerThe ID of the
Customer Group
. - channel_id in query - integerThe ID of the
Channel
. - channel_id:in in query - arrayFilter results by a comma-separated list of channel IDs.Type: array[integer]
example
curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/pricelists/assignments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'
Response
No Content.
Upsert Price List Assignment
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/pricelists/{price_list_id}/assignmentsRequest
Upsert a single Price List Assignment
for a Price List
.
Note:
- Supports up to 25 simultaneous PUT requests. Running more than the allowed number of requests concurrently on the same store will result in a
429
status error and your additional requests will fail.
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.
- price_list_id in path - integerrequired
The ID of the
Price List
requested. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
customer_group_idinteger
requiredCustomer group ID for assignment.Example: 2channel_idinteger
requiredChannel ID for assignmentExample: 1
example
{
"customer_group_id": 2,
"channel_id": 1
}
Response
A price list assignment.
Body
object | application/json
dataobject
example
{
"data": {
"id": 1,
"price_list_id": 1,
"customer_group_id": 2,
"channel_id": 2
},
"meta": {}
}
Did you find what you were looking for?