Get Price List Assignments
GET /stores/{store_hash}/v3/pricelists/assignments
Request
Fetches an array of Price List Assignments
matching a particular Customer Group and Price List and Channel.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- id in query - integer
The ID of the
Price List Assignment
. - price_list_id in query - integer
The ID of the
Price List
. - customer_group_id in query - integer
The ID of the
Customer Group
. - channel_id in query - integer
The ID of the
Channel
. - id:in in query - array
Filter items by a comma-separated list of
id
s. - customer_group_id:in in query - array
Filter items by a comma-separated list of
customer_group_id
s. - price_list_id:in in query - array
Filter items by a comma-separated list of
price_list_id
s. - channel_id:in in query - array
Filter items by a comma-separated list of
channel_id
s. - page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list of products.
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: xxxxxxxxxxxxxxxxx'
Response
An array of price list assignments and metadata.
Body
Array of the price list assignments matching the filter. The response is paginated.
dataarray[object]
metaobject
Data related the response, including pagination and collection totals.
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, "links": { "previous": "string", "current": "?page=1&limit=50", "next": "string" } } } }
Create Price List Assignments
POST /stores/{store_hash}/v3/pricelists/assignments
Request
Creates a batch of Price List Assignments
.
Note: The batch limit for Price List Assignments
is 25.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
Batch of price list assignments.
price_list_idinteger
Price list ID for assignment.
Example: 1
customer_group_idinteger
Customer group ID for assignment.
Example: 2
channel_idinteger
Channel ID for assignment
Example: 1
example
{ "price_list_id": 1, "customer_group_id": 2, "channel_id": 1 }
Response
OK
Body
Empty object.
example
{}
Delete Price List Assignments
DELETE /stores/{store_hash}/v3/pricelists/assignments
Request
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 - required
Parameters
- store_hash in path - string
- id in query - integer
The ID of the
Price List Assignment
. - price_list_id in query - integer
The ID of the
Price List
. - customer_group_id in query - integer
The ID of the
Customer Group
. - channel_id in query - integer
The ID of the
Channel
. - channel_id:in in query - string
Filter results by a comma-separated list of
channel_id
s.
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: xxxxxxxxxxxxxxxxx'
Response
No Content.
Upsert Price List Assignment
PUT /stores/{store_hash}/v3/pricelists/{price_list_id}/assignments
Request
Upsert a single Price List Assignment
for a Price List
.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- price_list_id in path - integer - required
The ID of the
Price List
requested. - Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
customer_group_idinteger
requiredCustomer group ID for assignment.
Example: 2
channel_idinteger
requiredChannel ID for assignment
Example: 1
example
{ "customer_group_id": 2, "channel_id": 1 }
Response
A price list assignment.
Body
dataobject
metaobject
Response metadata.
example
{ "data": { "id": 1, "price_list_id": 1, "customer_group_id": 2, "channel_id": 2 }, "meta": {} }