Modifier Groups

Update a modifier group

Changed on

Replace a modifier group. The request carries every field, and null clears a value unless the field says otherwise.

Required scopes: business/catalogue:read, business/catalogue:write

put/v1/modifier_groups/{modifier_group_id}

Request

  • Base URL
    https://api.yoco.com
  • Auth
    HTTP bearer

Path parameters

modifier_group_idstring required

The unique identifier of the modifier group.

Request body

namestring required

The name of the modifier group. It must be unique among the business's modifier groups.

min_selectionsinteger required

The minimum number of modifiers that must be selected from the group. A value of 0 means the group is optional.

max_selectionsinteger nullable required

The maximum number of modifiers that may be selected from the group. A value of null means there is no maximum.

Example request

{
  "max_selections": 1,
  "min_selections": 0,
  "modifiers": [
    {
      "fixed_price": {
        "amount": 1500,
        "currency": "ZAR"
      },
      "id": "1729001234890-cc33dd44-9876-4123-aabb-2233445566ff",
      "is_selected_by_default": false,
      "name": "Chips",
      "ordinal": 1,
      "pricing_strategy": "fixed_price"
    }
  ],
  "name": "Side Orders"
}

Response

Successful Response

idstring required

The unique identifier of the modifier group.

namestring required

The name of the modifier group.

min_selectionsinteger required

The minimum number of modifiers that must be selected from the group. A value of 0 means the group is optional.

max_selectionsinteger nullable required

The maximum number of modifiers that may be selected from the group. A value of null means there is no maximum.

created_atstring date-time required

The modifier group creation date and time in ISO 8601 format.

Example response

{
  "created_at": "2024-11-19T15:27:02+00:00",
  "id": "1729001234567-aa11bb22-3344-4cdd-99ee-1122334455ff",
  "max_selections": 2,
  "min_selections": 0,
  "modifiers": [
    {
      "fixed_price": {
        "amount": 500,
        "currency": "ZAR"
      },
      "id": "1729001234890-cc33dd44-9876-4123-aabb-2233445566ff",
      "is_selected_by_default": false,
      "modifier_group_id": "1729001234567-aa11bb22-3344-4cdd-99ee-1122334455ff",
      "name": "Chips",
      "ordinal": 1,
      "pricing_strategy": "fixed_price",
      "type": "product",
      "variant_id": "1719321844551-c61b8a54-902e-4f3d-9d70-8b1e2f5b1a90:small"
    }
  ],
  "name": "Side Orders"
}

Changes

    • breaking

      the /// request property's minLength was increased from 0 to 1

    • breaking

      added the pattern ^[A-Za-z0-9:-]+$ to the request property ///

    • info

      endpoint added