Get price groups
This articles will guide you through how to retrieve price groups. The Postman collection will be used for all examples. Price groups are used during checkout, e.g. when you add a product to basket.
Prerequisites
accessToken
from Connect flow.cultureCode
e.g.en-US
Optional query parameters
maxItems
- limits the number of payment methods returned. The list is paginated.nextPagingToken
- required to fetch the next page. The token is described in detail in the Next Paging Token article.
Get Price Groups
Open the Get Price Groups
request.
Provide the mandatory query parameter - cultureCode
. Optional query parameters can be added as well.
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:
{ "pagingToken": null, "priceGroups": [ { id: "{id}", name: "{priceGroupsName}" } ] }
Possible errors that may occur
Error | Description |
---|---|
BadRequest (400) | Invalid access token; Invalid culture code etc. |
Unauthorized (401) | The token is expired. |
Forbidden (403) | The token does not have access to this endpoint. |
{ "errors": [ { "error-description": "Invalid cultureCode.", "error": "BadRequest" } ] }
See Handling failures for more info.