API
Data API
Categories
Methods allow you to get a list of portal brands or information on a specific brand.

Return a list of categories.
Request example
GET /categories
GET
https://instance_name/api/data/v1.0/categories/
Header Parameters
- AuthorizationstringrequiredDescriptionString in "Token XXXXXX..." format.
Body Parameters
- limitIntegerDescriptionThe number of results to return per page.
- offsetIntegerDescriptionThe initial index from which to return the results.
curl
curl –i –X GET
https://test.eyrene.com/api/data/v1.0/categories/
-H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’
–F "offset=30"200
{
"count":45,
"next":"https://test.eyrene.com/api/data/v1.0/categories/?limit=30&offset=30",
"previous":null,
"results":[
{
"id":236,
"name":"CANDIES"
},
{
"id":240,
"name":"CHOCOLATE STICKS"
},
{
"id":255,
"name":"COFFEE"
},
{
"id":257,
"name":"COFFEE CAPSULES"
},
{
"id":258,
"name":"CAT FOOD"
},
{
"id":260,
"name":"DOG FOOD"
},
{
"id":261,
"name":"FRUIT PUREE"
},
{
"id":263,
"name":"JUICE DRINK"
}"..."
]
}Response parameters​

count integer
The number of categories.

next string (uri) Nullable
Next page.

previous string (uri) Nullable
Previous page.

results array of objects
An array of objects with information about categories.
- id integer Category ID.
- name string [ 1 .. 255 ] characters Category name.



Returns information about the category by ID.
Request example
GET /categories/{id}
GET
https://instance_name/api/data/v1.0/categories/{id}
Path Parameters
- idstringrequiredDescriptionCategory ID.
Header Parameters
- AuthorizationstringrequiredDescriptionString in "Token XXXXXX..." format.
curl
curl –i –X GET
https://test.eyrene.com/api/data/v1.0/categories/19765/
-H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’
–F "limit=3" \
–F "offset=0" 200
{
"id":19765,
"name":"CAT FOOD"
}Response parameters​

id integer
Category ID.

name string [ 1 .. 255 ] characters
Category name.