Organisations

Create a Label

Create a new label against the given organisation. Labels can be restricted to a subset of the organisation's sites by passing the relevant site_ids; staff at other sites won't see the label in the admin UI.

post/shop/organisations/{organisationId}/labels

Path parameters

organisationIdstring uuid required

Identifier of the organisation. Organisations group sites together under a single billing/admin entity; the caller's API key must have access to the named organisation.

Request body

namestring required

Display name of the label. 1-40 characters; must not contain HTML.

colorstring nullable

Hex colour used to render the label in the admin UI, including the leading #. Lower-case hexadecimal; must match #rrggbb. Defaults to #f1f1f1 when omitted.

site_idsstring[] required

Identifiers of the sites within the organisation that should be allowed to see and apply this label. Every site ID must belong to the same organisation as the label.

Example request

{
  "name": "VIP",
  "color": "#ff5733",
  "site_ids": [
    "65a0c2e5b3a7d2f8c1d4e7ba"
  ]
}

Response

The label was successfully retrieved.

Example response

{
  "data": {
    "id": "6630f7a8e1a4c2b1d4d5e7c1",
    "name": "VIP",
    "color": "#ff5733",
    "organisation_id": "65a0c2e5b3a7d2f8c1d4e7b9",
    "site_ids": [
      "65a0c2e5b3a7d2f8c1d4e7ba",
      "65a0c2e5b3a7d2f8c1d4e7bb"
    ]
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.