iotoms Docs

Create a size

POST
/api/v1/catalog/attributes/sizes

Creates a product size that items can use as a variant attribute. The name is required and must be unique. Returns 201 with the new size, including its ID.

How to use it

  1. Send a name that is not already used by another size, e.g. XL; status defaults to active.
  2. The new size is returned with its ID (201 Created) and can be used as an item variant attribute.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
id?|

Numeric size ID; use it as sizeId on items.

Formatint64
name*string

Size name, unique across the catalog.

status*string

Size status, e.g. active.

modifiedTime*string

When the size was last changed (ISO 8601 timestamp).

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Numeric size ID; use it as sizeId on items.

Formatint64
name*string

Size name, unique across the catalog.

status*string

Size status, e.g. active.

modifiedTime*string

When the size was last changed (ISO 8601 timestamp).

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