---
title: Categories
slug: xP1J-categories
docTags: 
createdAt: 2022-04-13T08:21:37.000Z
---

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.

***

::::ExpandableHeading{isOpen="true"}
# <font color="#2166ae">GET</font> /сategories

Retrieves a list of categories.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/v1.5/categories/",
  "name": "Request example",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "optional",
        "name": "limit",
        "type": "string",
        "description": "The number of results to return per page."
      },
      {
        "kind": "optional",
        "name": "offset",
        "type": "string",
        "description": "The initial index from which to return the results."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "1rlkLKO5JlhTk3S80Ce0g",
        "code": "{\n   \"count\":2,\n   \"next\":\"http://example.com\",\n   \"previous\":\"http://example.com\",\n   \"results\":[\n      {\n         \"id\":3155,\n         \"name\":\"GROUND COFFEE\"\n      },\n      {\n         \"id\":47,\n         \"name\":\"HAIR CARE\"\n      }\n   ]\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "1rlkLKO5JlhTk3S80Ce0g"
  },
  "examples": {
    "languages": [
      {
        "id": "Cu1xhLxZ5PHAuLFx_iIf1",
        "code": "curl –i –X GET\r\n  https://test.eyrene.com/api/v1.5/categories/\r\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’ \r\n  –F \"limit=2\" \\\r\n  –F \"offset=0\" ",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Cu1xhLxZ5PHAuLFx_iIf1"
  },
  "description": "GET /categories",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example",
  "legacyHash": "wNy7p748vPqeXWK_IkqN_"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1.5/catalog/brands#response-definitions)

***

**`count`** *integer*

The number of categories.

***

**`next`** *string (uri)* <font color="#2166ae">*Nullable*</font>**

Next page.

***

**`previous`** *string (uri)* <font color="#2166ae">*Nullable*</font>**

Previous page.

***

**`results`** a*rray of objects*

An array of objects with information about categories:

- **`id`** *string&#x20;*&#xA;Category ID.
- **`name`** *string*
  Category name.

***
::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#3b9f0f">POST</font> /сategories

Сreate a new category.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/v1.5/сategories/",
  "name": "Request example",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "optional",
        "name": "id",
        "type": "string",
        "description": "Category ID."
      },
      {
        "kind": "optional",
        "name": "name",
        "type": "string",
        "description": "Category name."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "xcVqafQ2RCx_iOpUkQJ43",
        "code": "{\n   \"result\": \"CREATED\"\n}",
        "language": "201",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "xcVqafQ2RCx_iOpUkQJ43"
  },
  "examples": {
    "languages": [
      {
        "id": "Cu1xhLxZ5PHAuLFx_iIf1",
        "code": "curl –i –X POST\r\n  https://test.eyrene.com/api/v1.5/categories/ \r\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’ \r\n  -F \"id=1234567890\" \\\r\n  -F \"name=Washing powder\"",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Cu1xhLxZ5PHAuLFx_iIf1"
  },
  "description": "POST /сategories",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-1",
  "legacyHash": "XB9ch8dXR0zYZeMtCj3MP"
}
```
:::
::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#2166ae">GET</font> /сategories/&#x7B;id}

Retrieve detailed information about a category by ID.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/v1.5/сategories/{id}",
  "name": "Request example",
  "method": "GET",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Category ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "BcmDi-d9UM-V1Lp9EpJ4I",
        "code": "{\n  \"id\": 1234567890,\n  \"name\": \"Washing powder\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "BcmDi-d9UM-V1Lp9EpJ4I"
  },
  "examples": {
    "languages": [
      {
        "id": "Cu1xhLxZ5PHAuLFx_iIf1",
        "code": "curl –i –X GET\r\n  https://test.eyrene.com/api/v1.5/сategories/1234567890/ \r\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’ ",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Cu1xhLxZ5PHAuLFx_iIf1"
  },
  "description": "GET /сategories/{id}",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-2",
  "legacyHash": "uKxag_qTY3XMR8Mu25NvQ"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1.5/catalog/brands_id#response-definitions)

***

**`id`** *string*

Category ID.

***

**`name`** *string*

Category name.

***


::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#f77d05">PUT</font> /сategories/&#x7B;id}

Update all category fields.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/v1.5/categories/{id}",
  "name": "Request example",
  "method": "PUT",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Category ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "optional",
        "name": "id",
        "type": "string",
        "description": "New category ID."
      },
      {
        "kind": "optional",
        "name": "name",
        "type": "string",
        "description": "Category new name."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "BcmDi-d9UM-V1Lp9EpJ4I",
        "code": "{\n   \"id\":1234567890112,\n   \"name\":\"CAT FOOD\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "BcmDi-d9UM-V1Lp9EpJ4I"
  },
  "examples": {
    "languages": [
      {
        "id": "Cu1xhLxZ5PHAuLFx_iIf1",
        "code": "curl –i –X PUT\r\n  https://test.eyrene.com/api/v1.5/categories/1234567890/ \r\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’\r\n  -F \"id=1234567890112\" \\\r\n  -F \"name=CAT FOOD\" ",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Cu1xhLxZ5PHAuLFx_iIf1"
  },
  "description": "PUT /categories/{id}",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-3",
  "legacyHash": "Bwm0N39cdvAKBSkrmQCSb"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1.5/catalog/brands_id#response-definitions-1)

***

**`id`** *string*

New category ID.

***

**`name`** *string*

Category new name.

***


::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#03d1eb">PATCH</font> /сategories/&#x7B;id}

Update some of the category fields.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/v1.5/categories/{id}",
  "name": "Request example",
  "method": "PATCH",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Category ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "optional",
        "name": "id",
        "type": "string",
        "description": "New category ID."
      },
      {
        "kind": "optional",
        "name": "name",
        "type": "string",
        "description": "Category new name."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "BcmDi-d9UM-V1Lp9EpJ4I",
        "code": "{\n   \"id\":1234567890,\n   \"name\":\"DISHWASHING\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "BcmDi-d9UM-V1Lp9EpJ4I"
  },
  "examples": {
    "languages": [
      {
        "id": "Cu1xhLxZ5PHAuLFx_iIf1",
        "code": "curl –i –X PATCH\r\n  https://test.eyrene.com/api/v1.5/categories/1234567890/ \r\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’\r\n  -F \"name=DISHWASHING\"",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Cu1xhLxZ5PHAuLFx_iIf1"
  },
  "description": "PATCH /categories/{id}",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-4",
  "legacyHash": "hu99GsoU5ezIH8-LNq2ah"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1.5/catalog/brands_id#response-definitions-1)

***

**`id`** *string*

New category ID.

***

**`name`** *string*

Category new name.

***


::::

***

