Get product catalogs
Why is this necessary?
You need a valid product catalog id to convert a basket to an order
Getting into it
To get your catalogs your request should have at least the required request headers:
- PriceGroupId
There are optional parameters as following:
- MaxItems
- NextPagingToken
If you are not sure what MaxItems
and NexPagingToken
are, take a look Here
The first thing you need to do is to attach your AccessToken token to the request's header. See Quick Start if you are not sure how to do that.
Secondly you need a priceGroup Id. if you are unsure how to get this you can look here
After you get both of these you are ready to get a list of product Catalogs. You need to insert the priceGroup id as a query parameter like this:
api/v1/productCatalogs/2a45c12d-q8ur-kc20-24y6-1273kf7cbc8c
an example of how to get the list of product catalogs could be:
curl -D- -X GET https://umbracodemo1.ucommerce.net/api/v1/productCatalogs/2a45c12d-q8ur-kc20-24y6-1273kf7cbc8c \ -H 'Authorization: Bearer <ACCESS_TOKEN>' -H 'Content-Type: application/json' \
If you get a successful response, you will get a list of product catalogs returned to you.
Example of successful response:
{ "catalogs": [ { "id": "8k34a01f-21e1-nh9e-afc2-490c304bd478", "name": "Demo Store" }, { "id": "7k97a01f-21e1-nh9e-afc2-490c304bd478", "name": "Teemo Store" } ], "pagingToken": null }
Note: For an explanation of the Next Paging Token go to NextPagingToken.
Possible errors that may occur:
Error | Description |
---|---|
BadRequest (400) | Invalid Price Group GUID |
Unauthorized (401) | The token expires |
Forbidden (403) | The token does not have access to this endpoint |
See Handling failures for more info.