iotoms Docs

Update a category

PUT
/api/v1/catalog/attributes/categories/{id}

Renames a product category; only name is applied. Returns the category directly (no status/message envelope), or 404 if it does not exist.

How to use it

  1. Get the category's ID from List categories.
  2. Send the new name; it must stay unique. Only the name is changed.
  3. The response is the updated category itself; 404 if the ID does not exist.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

Request Body

application/json
  1. body
id?|

Unique numeric ID of the category. Set by the server; omit it when creating.

Formatint64
name*string

Category name. Required, must not be blank, and must be unique.

modifiedTime*string

Time the category was created (ISO 8601 date-time). Set by the server; renaming the category does not change it.

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Unique numeric ID of the category. Set by the server; omit it when creating.

Formatint64
name*string

Category name. Required, must not be blank, and must be unique.

modifiedTime*string

Time the category was created (ISO 8601 date-time). Set by the server; renaming the category does not change it.

Formatdate-time
Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/catalog/attributes/categories/0' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "modifiedTime": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": 0,  "name": "string",  "modifiedTime": "2019-08-24T14:15:22Z"}