Thanks for being patient while we implement your feedback to improve the developer experience.

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 - 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 ids.

  • customer_group_id:in in query - array

    Filter items by a comma-separated list of customer_group_ids.

  • price_list_id:in in query - array

    Filter items by a comma-separated list of price_list_ids.

  • channel_id:in in query - array

    Filter items by a comma-separated list of channel_ids.

  • 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

object | application/json

Array of the price list assignments matching the filter. The response is paginated.

  • data
    array[object]

  • meta
    object

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

array | application/json

Batch of price list assignments.

  • price_list_id
    integer

    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

OK

Body

object | application/json

Empty object.

    example

    {}

    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 - 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_ids.

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

    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": {} }