# Modifiers

Modifiers are the last level in the menu hierarchy, they allow you to add variant customizations to the products.

# The Modifier Object

# Sample

{
  "id": "8f7ba4c6",
  "name": "Sauce",
  "name_localized": null,
  "is_ready": true,
  "reference": "mod-03",
  "created_at": "2019-12-29 09:34:42",
  "updated_at": "2019-12-29 09:41:48",
  "deleted_at": null,
  "options": [
    {
      "ingredients": [
        {
          "pivot": {
            "quantity": 100
          },
          "id": "8f7ba5c7"
        }
      ],
      "branches": [
        {
          "pivot": {
            "price": 2,
            "is_active": true,
            "is_in_stock": true
          },
          "id": "8f7ab00a"
        }
      ],
      "tax_group": {
        "id": "8f7abdbd"
      },
      "id": "8f7ba750",
      "name": "Red Sauce",
      "name_localized": null,
      "sku": "sk-0002",
      "is_active": true,
      "costing_method": 2,
      "price": 3,
      "cost": null,
      "calories": null,
      "products": [
        {
          "id": "8f7abbb"
        }
      ]
    }
  ]
}

# Attributes

Field Type Rule Description
id string Unique identifier for the modifier
name* string updatable Name of the modifier
name_localized string nullable updatable Localized modifier name if business uses localization.
is_ready boolean updatable True if the modifier is ready and can be sold
reference string updatable Unique reference for the modifier
products array updatable includable List of Products attached to the modifier
options array updatable includable List of Modifier Options ids attached to the modifier
options.tax_group object updatable includable The Tax Group attached to the modifier option
options.branches array updatable includable List of Branches where the modifier option has custom attributes
options.ingredients array updatable includable List of Inventory Items ids attached to the modifier option as ingredients
created_at string sortable Time at which the object was created in UTC. YYYY-MM-DD HH-MM-SS
updated_at string sortable Time at which the object was updated in UTC. YYYY-MM-DD HH-MM-SS
deleted_at string nullable Time at which the object was deleted in UTC. YYYY-MM-DD HH-MM-SS

# List Modifiers

GET /modifiers

# Scope

general.read

# Filters

  • id
  • name
  • name_localized
  • reference
  • is_ready
  • with_ingredients
  • updated_after
  • is_deleted
  • created_on
  • updated_on
  • deleted_on

# Response

{
  "data": [
    {
      "id": "8f7ba4c6",
      "name": "Sauce",
      "name_localized": null,
      "is_ready": true,
      "reference": "mod-03",
      "created_at": "2019-12-29 09:34:42",
      "updated_at": "2019-12-29 09:41:48",
      "deleted_at": null,
      "options": [
        {
          "ingredients": [
            {
              "pivot": {
                "quantity": 100
              },
              "id": "8f7ba5c7"
            }
          ],
          "branches": [
            {
              "pivot": {
                "price": 2,
                "is_active": true,
                "is_in_stock": true
              },
              "id": "8f7ab00a"
            }
          ],
          "tax_group": {
            "id": "8f7abdbd"
          },
          "id": "8f7ba750",
          "name": "Red Sauce",
          "name_localized": null,
          "sku": "sk-0002",
          "is_active": true,
          "costing_method": 2,
          "price": 3,
          "cost": null,
          "calories": null,
          "products": [
            {
              "id": "8f7abbb"
            }
          ]
        }
      ]
    }
  ]
}

# Get Modifier

GET /modifiers/{modifierId}

# Scope

general.read

# Response

{
  "data": {
    "id": "8f7ba4c6",
    "name": "Sauce",
    "name_localized": null,
    "is_ready": true,
    "reference": "mod-03",
    "created_at": "2019-12-29 09:34:42",
    "updated_at": "2019-12-29 09:41:48",
    "deleted_at": null,
    "options": [
      {
        "ingredients": [
          {
            "pivot": {
              "quantity": 100
            },
            "id": "8f7ba5c7"
          }
        ],
        "branches": [
          {
            "pivot": {
              "price": 2,
              "is_active": true,
              "is_in_stock": true
            },
            "id": "8f7ab00a"
          }
        ],
        "tax_group": {
          "id": "8f7abdbd"
        },
        "id": "8f7ba750",
        "name": "Red Sauce",
        "name_localized": null,
        "sku": "sk-0002",
        "is_active": true,
        "costing_method": 2,
        "price": 3,
        "cost": null,
        "calories": null,
        "products": [
          {
            "id": "8f7abbb"
          }
        ]
      }
    ]
  }
}

# Create Modifier

POST /modifiers

# Scope

menu.write

# Request

{
    "name": "Sauce",
    "name_localized": null
}

# Response

{
  "data": {
    "id": "8f7ba4c6",
    "name": "Sauce",
    "name_localized": null,
    "is_ready": true,
    "reference": "mod-03",
    "created_at": "2019-12-29 09:34:42",
    "updated_at": "2019-12-29 09:41:48",
    "deleted_at": null,
    "options": [
      {
        "ingredients": [
          {
            "pivot": {
              "quantity": 100
            },
            "id": "8f7ba5c7"
          }
        ],
        "branches": [
          {
            "pivot": {
              "price": 2,
              "is_active": true,
              "is_in_stock": true
            },
            "id": "8f7ab00a"
          }
        ],
        "tax_group": {
          "id": "8f7abdbd"
        },
        "id": "8f7ba750",
        "name": "Red Sauce",
        "name_localized": null,
        "sku": "sk-0002",
        "is_active": true,
        "costing_method": 2,
        "price": 3,
        "cost": null,
        "calories": null,
        "products": [
          {
            "id": "8f7abbb"
          }
        ]
      }
    ]
  }
}

# Update Modifier

PUT /modifiers/{modifierId}

# Scope

menu.write

# Request

{
    "name": "Sauce",
    "name_localized": null
}

# Response

{
  "data": {
    "id": "8f7ba4c6",
    "name": "Sauce",
    "name_localized": null,
    "is_ready": true,
    "reference": "mod-03",
    "created_at": "2019-12-29 09:34:42",
    "updated_at": "2019-12-29 09:41:48",
    "deleted_at": null,
    "options": [
      {
        "ingredients": [
          {
            "pivot": {
              "quantity": 100
            },
            "id": "8f7ba5c7"
          }
        ],
        "branches": [
          {
            "pivot": {
              "price": 2,
              "is_active": true,
              "is_in_stock": true
            },
            "id": "8f7ab00a"
          }
        ],
        "tax_group": {
          "id": "8f7abdbd"
        },
        "id": "8f7ba750",
        "name": "Red Sauce",
        "name_localized": null,
        "sku": "sk-0002",
        "is_active": true,
        "costing_method": 2,
        "price": 3,
        "cost": null,
        "calories": null,
        "products": [
          {
            "id": "8f7abbb"
          }
        ]
      }
    ]
  }
}

# Delete Modifier

DELETE /modifiers/{modifierId}

# Scope

menu.write

The API will respond with 200 indicating that the modifier has been deleted.

# Restore Modifier

PUT /modifiers/{modifierId}/restore

# Scope

admin.restore

The API will respond with 200 indicating that the modifier has been restored.

Last Updated: 19/9/2023, 2:52:13 PM