Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a retail store group

Creates a retail store group and assigns the listed stores to it.

name, slug, and stores are required; stores may be an empty list. The slug must be unique across all groups. A listed store that already belongs to another group is moved to the new group (see Store Membership in the section description).

post
/retailstoregroups/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

Request body for creating or fully updating a retail store group.

namestring · max: 255Required

The group name.

Example: Istanbul Stores
slugstring · max: 64Required

The unique identifier of the group, made of letters, numbers, underscores, or hyphens. Must not already belong to another group.

Example: istanbul-storesPattern: ^[-a-zA-Z0-9_]+$
storesinteger[]Required

The identifiers of the retail stores in the group; an empty list is accepted. The listed stores become the group's exact members — a store of another group is moved to this group, and on update, stores of the group that are not listed are detached from it.

Example: [1,133]
is_activebooleanOptional

Whether the group is active. When left out, a create stores true and a full update keeps the stored value (form-encoded requests differ — see Form-Encoded Requests in the section description).

Example: true
Responses
201

The created retail store group.

application/json

A retail store group — a named group of retail stores, used by schedules and slot suspender rules.

pkintegerRead-onlyOptional

The unique identifier of the group.

Example: 1
is_activebooleanOptional

Whether the group is active. Not checked when schedules or slot suspender rules are matched to a group.

Default: trueExample: true
namestring · max: 255Optional

The group name.

Example: Istanbul Stores
storesinteger[]Optional

The identifiers of the retail stores in the group.

Example: [1,133]
slugstring · max: 64Optional

The unique identifier of the group. Referenced by slot suspender rules.

Example: istanbul-storesPattern: ^[-a-zA-Z0-9_]+$
schedulesinteger[]Read-onlyOptional

The identifiers of the schedules assigned to the group.

post/retailstoregroups/
POST /api/v1/remote/1/retailstoregroups/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 85

{
  "name": "Istanbul Stores",
  "slug": "istanbul-stores",
  "stores": [
    1,
    133
  ],
  "is_active": true
}
{
  "pk": 1,
  "is_active": true,
  "name": "Istanbul Stores",
  "stores": [
    1,
    133
  ],
  "slug": "istanbul-stores",
  "schedules": []
}

Last updated

Was this helpful?