Skip to main content
GET/product-categories-by-id/

Get product categories

You can return a list of all your product categories.

Returns up to 25 product categories per page. To get the rest, follow next (see Response pagination).

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/product-categories-by-id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 30,
"name": "my category_1",
"custom_id": "my_id_1",
"description": "category description"
},
{
"id": 32,
"name": "my category_2",
"custom_id": "custom_id_2",
"description": "category description"
}
]
}

Response fields​

Fields returned in the 200 OK response body.

countinteger
Number of results across all pages. It can lag behind recent changes; see Response pagination.
nextstring (URL)nullable
URL of the next page of results. null on the last page.
previousstring (URL)nullable
URL of the previous page of results. null on the first page.
resultsarray of objects
Results on this page.
results[].idinteger
ID of the product category.
results[].namestring
A product name.
results[].custom_idstringnullable
A unique identifier for the product category which is provided by the client.
results[].descriptionstring
Description of the category; an empty string if it has none.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.