iotoms Docs

Update a department

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

Renames a product department; only name is applied and it must stay unique. Returns the department directly (no status/message envelope), or not found if it does not exist.

How to use it

  1. Get the department ID from List departments.
  2. Send the new name; only the name is changed and it must stay unique.
  3. The department is returned directly, without the status/message envelope; not found 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?|

Numeric department ID. Set by the server; use it as departmentId on items.

Formatint64
name*string

Department name, e.g. the top-level grouping of items in the catalog. Required, must be unique and not blank.

modifiedTime*string

Timestamp stored when the department was created (ISO 8601). Renaming it does not change it.

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Numeric department ID. Set by the server; use it as departmentId on items.

Formatint64
name*string

Department name, e.g. the top-level grouping of items in the catalog. Required, must be unique and not blank.

modifiedTime*string

Timestamp stored when the department was created (ISO 8601). Renaming it does not change it.

Formatdate-time
Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/catalog/attributes/departments/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"}