Organisations

Update a Label

Update an existing label. Pass the fields you want to change; site_ids is required and replaces the stored list of sites the label is visible to.

put/shop/organisations/{organisationId}/labels/{labelId}

Request body

namestring

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.

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. The provided list replaces any previously stored list.

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.