API
Image Recognition API
Categories
Methods allow you to get a complete list or a specific category in Eyrene, view information about them, update all fields, or only select category fields.

Retrieves a list of categories.
Request example
GET /categories
GET
https://instance_name/api/v1.5/categories/
curl âi âX GET
https://test.eyrene.com/api/v1.5/categories/
-H âAuthorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875eâ
âF "limit=2" \
âF "offset=0" 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 string Category ID.
- name string Category name.


Сreate a new category.
Request example
POST /Ñategories
POST
https://instance_name/api/v1.5/Ñategories/
curl âi âX POST
https://test.eyrene.com/api/v1.5/categories/
-H âAuthorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875eâ
-F "id=1234567890" \
-F "name=Washing powder"
Retrieve detailed information about a category by ID.
Request example
GET /Ñategories/{id}
GET
https://instance_name/api/v1.5/Ñategories/{id}
curl âi âX GET
https://test.eyrene.com/api/v1.5/Ñategories/1234567890/
-H âAuthorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875eâ Response parametersâ

id string
Category ID.

name string
Category name.
/brands/{id}


Update all category fields.
Request example
PUT /categories/{id}
PUT
https://instance_name/api/v1.5/categories/{id}
curl âi âX PUT
https://test.eyrene.com/api/v1.5/categories/1234567890/
-H âAuthorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875eâ
-F "id=1234567890112" \
-F "name=CAT FOOD" Response parametersâ

id string
New category ID.

name string
Category new name.



Update some of the category fields.
Request example
PATCH /categories/{id}
PATCH
https://instance_name/api/v1.5/categories/{id}
curl âi âX PATCH
https://test.eyrene.com/api/v1.5/categories/1234567890/
-H âAuthorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875eâ
-F "name=DISHWASHING"Response parametersâ

id string
New category ID.

name string
Category new name.