/categories/{id}
Retrieve detailed category information by ID, or updates the fields in the category card (specified or all).
Adress: https://instance_name/api/v1.5/categories/{id}
Methods:
- GET — retrieve detailed category information by ID;
- PUT — update all category fields;
- PATCH — update some category fields.
Content-type: application/json
- GET
- PUT
- PATCH
Path parameters
id
string
Request example
curl –i –X GET
https://test.inspector-cloud.com/api/v1.5/categories/1234567890/
-H ‘Authorization: Token <<your_token>>’
Response example
Response code: 200
{
"id": 1234567890,
"name": "Washing powder"
}
Response definitions
id
string
Category ID.
name
string
Category name.
Path parameters
id
string
Request body parameters
id
string
New category ID.
name
string
Category new name.
Request example
curl –i –X PUT
https://test.inspector-cloud.com/api/v1.5/categories/1234567890/
-H ‘Authorization: Token <<your_token>>’
-F "id=1234567890112" \
-F "name=CAT FOOD"
Response example
Response code: 200
{
"id": 1234567890112,
"name": "CAT FOOD"
}
Response definitions
id
string
New category ID.
name
string
Category new name.
Path parameters
id
string
Request body parameters
id
string
New category ID.
name
string
Category new name.
Request example
curl –i –X PATCH
https://test.inspector-cloud.com/api/v1.5/categories/1234567890/
-H ‘Authorization: Token <<your_token>>’
-F "name=DISHWASHING"
Response example
Response code: 200
{
"id": 1234567890,
"name": "DISHWASHING"
}
Response definitions
id
string
New category ID.
name
string
Category new name.