Create a department
POST
Creates a new product department used to group items in the catalog and returns it directly with HTTP 201. Department names must be unique.
How to use it
- Send a unique, non-blank name, e.g. {"name": "Grocery"}.
- The department is created (HTTP 201) and returned directly, without the status/message envelope.
- Use its id as departmentId when creating or updating items.
BearerAuthheader
AuthorizationBearer <JWT>application/json- body
id?|Numeric department ID. Set by the server; use it as departmentId on items.
Format
int64name*stringDepartment name, e.g. the top-level grouping of items in the catalog. Required, must be unique and not blank.
modifiedTime*stringTimestamp stored when the department was created (ISO 8601). Renaming it does not change it.
Format
date-timeOK
*/*- response
id?|Numeric department ID. Set by the server; use it as departmentId on items.
Format
int64name*stringDepartment name, e.g. the top-level grouping of items in the catalog. Required, must be unique and not blank.
modifiedTime*stringTimestamp stored when the department was created (ISO 8601). Renaming it does not change it.
Format
date-timeExample Request
curl -X POST 'https://beta.iotoms.com/api/v1/catalog/attributes/departments' \ -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"}