iotoms Docs

Create a store

POST
/api/v1/catalog/business/stores

Creates a new store in a venue and returns it with HTTP 201. name, venueId and storeType are required; status defaults to ACTIVE.

How to use it

  1. Get the venue ID from List venues (create one with Create a venue if needed).
  2. Send name, venueId, storeType, optional promotional fields and status.
  3. The new store is returned with its ID, and a stock location for the store is created automatically. Use the ID wherever a storeId is asked for, such as Check readiness to start a session.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
name*string

Store name. Required and cannot be blank.

venueId*integer

ID of the venue (site or location group) the store belongs to; from List venues. Required.

Formatint64
storeType*string

Free-text store category set by the merchant, for example a format or channel label. Required.

promotionalMessage?|

Optional promotional text shown for the store.

promotionalImage?|

Optional reference to a promotional image for the store.

status*string

Store status: ACTIVE, INACTIVE, ARCHIVED or DELETED. Defaults to ACTIVE.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"

Response Body

OK

*/*
  1. response
id?|

Store ID. Send it as storeId when creating or moving a register.

Formatint64
name*string

Store name, unique across the merchant.

venue?

The venue (site) the store belongs to, if any.

storeType?|

Free-text store type set by the merchant.

promotionalMessage?|

Promotional message configured for the store.

promotionalImage?|

Promotional image reference configured for the store.

status*string

Store status: ACTIVE, INACTIVE, ARCHIVED or DELETED.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"
modifiedTime*string

When the store was last changed.

Formatdate-time
createdViaAi*boolean

True when the store was created through the AI assistant.

aiSessionId?|

ID of the AI assistant session that created the store, when createdViaAi is true.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/catalog/business/stores' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "venueId": 0,  "storeType": "string",  "status": "ACTIVE"}'
Example Response
{  "id": 0,  "name": "string",  "venue": {    "id": 0,    "name": "string",    "status": "ACTIVE",    "modifiedTime": "2019-08-24T14:15:22Z"  },  "storeType": "string",  "promotionalMessage": "string",  "promotionalImage": "string",  "status": "ACTIVE",  "modifiedTime": "2019-08-24T14:15:22Z",  "createdViaAi": true,  "aiSessionId": "string"}