Price Lists Assignments

Price Lists Assignments

Get Price List Assignments

GET /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

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 IDs.
    Type: array[integer]
  • customer_group_id:in in query - array
    Filter items by a comma-separated list of customer group IDs.
    Type: array[integer]
  • price_list_id:in in query - array
    Filter items by a comma-separated list of price list IDs.
    Type: array[integer]
  • channel_id:in in query - array
    Filter items by a comma-separated list of channel IDs.
    Type: array[integer]
  • 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. If you provide only a limit, the API returns both paginations while applying that limit.
  • before in query - string
    A 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 - string
    A 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.
  • data
    array[object]

  • meta
    object

    'Contains data about paginating the response via cursors. If no pagination details are specified or if you only provide a limit, then both properties will be present. When a 'before' or 'after' cursor is provided, only the 'cursor_pagination' property will be present. When a 'page' parameter is provided, only the offset based 'pagination' property will be present.'

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 /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

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

array | application/json
Batch of price list assignments.
  • price_list_id
    integer
    required

    Price list ID for assignment.
    Example: 1
  • customer_group_id
    integer

    Customer group ID for assignment.
    Example: 2
  • channel_id
    integer

    Channel ID for assignment
    Example: 1

example

[
{
"price_list_id": 1,
"customer_group_id": 2,
"channel_id": 1
}
]

Response

No content

Delete Price List Assignments

DELETE /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

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.
  • channel_id:in in query - array
    Filter 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 /pricelists/{price_list_id}/assignments

Request

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 - string
    required
    The MIME type of the response body.
  • 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

object | application/json
  • customer_group_id
    integer
    required

    Customer group ID for assignment.
    Example: 2
  • channel_id
    integer
    required

    Channel ID for assignment
    Example: 1

example

{
"customer_group_id": 2,
"channel_id": 1
}

Response

A price list assignment.

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": 1,
"price_list_id": 1,
"customer_group_id": 2,
"channel_id": 2
},
"meta": {}
}
Did you find what you were looking for?