Price Groups

Prerequisites

Get Price Groups

Optional Parameters

Request

curl -D- -X GET <base_url>/api/v1/price-groups?cultureCode=<cultureCode>&maxItems=<maxItems>&nextPagingToken=<nextPagingToken> \
    -H 'Authorization: Bearer <ACCESS_TOKEN>'
    -H 'Content-Type: application/json'

Response

{
    "nextPagingToken": null,
    "priceGroups": [
        {  
            id: "{id}",
            name: "{priceGroupsName}"
        }
    ]
}

Error Handling

Error Response Example

{
"errors":
    [
        {
            "error-description": "Invalid cultureCode.",
            "error": "BadRequest"
        }
    ]
}

Filtering Valid Price Groups

To get the valid price groups for a context, this endpoint supports giving it a set of properties prefixed with filters-. This will make the API only return price groups that are valid according to the criteria set up for them. The API will map any parameters prefixed filters- to a dictionary of properties, sent to the GetPriceGroups pipeline, in the following way. The parameter name will be mapped to the key in the dictionary, with the filters- part of the name stripped off. The parameter value will be mapped to the value in the dictionary.

curl -D- -X GET <base_url>/api/v1/price-groups?filters-member=member@gmail.com&cultureCode=<cultureCode>&maxItems=<maxItems>&nextPagingToken=<nextPagingToken> \
    -H 'Authorization: Bearer <ACCESS_TOKEN>'
    -H 'Content-Type: application/json'

In the above example, we are calling the API with a filters-member query parameter. The key will be member and the value will be member@gmail.com

See the guide on extending price group criteria for more details on how to use the properties in a pipeline task.

Last updated