Every category
GET
/categories
const url = 'https://app.currentpim.se/api/v1/categories';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.currentpim.se/api/v1/categories \ --header 'Authorization: Bearer <token>'Needs catalog:read and categories.view. Parents come before their children.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Categories in tree order.
Media typeapplication/json
object
data
required
Array<object>
object
code
string
parent
string | null
labels
Labels per locale code.
object
key
additional properties
string
Example generated
{ "data": [ { "code": "example", "parent": "example", "labels": { "additionalProperty": "example" } } ]}No valid token (missing, revoked, expired, or the account is deactivated).
Media typeapplication/json
object
message
required
string
errors
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
key
additional properties
Array<string>
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}The token lacks the ability or the account the permission.
Media typeapplication/json
object
message
required
string
errors
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
key
additional properties
Array<string>
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}More than the allowed requests a minute for this token; Retry-After says when to try again.
Media typeapplication/json
object
message
required
string
errors
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
key
additional properties
Array<string>
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}