# Categories

Categories are the top level in the menu hierarchy. It's not mandatory to map categories as no category related information is required when sending orders but can be useful for menu representation at the integrator app or website.

# The Category Object

# Sample

{
  "id": "8d161995",
  "name": "Meals",
  "name_localized": null,
  "reference": "cat-01",
  "image": "https://mywebsite.com/image.png",
  "discounts": [
    {
      "id": "8d90b7rr"
    }
  ],
  "timed_events": [
    {
      "id": "8d90b7ff"
    }
  ],
  "products": [
    {
      "id": "8d90b7dd"
    }
  ],
  "combos": [
    {
      "id": "8eda78a5"
    }
  ],
  "gift_card_products": [
    {
      "id": "8d969736"
    }
  ],
  "created_at": "2019-02-27 09:43:00",
  "updated_at": "2019-02-27 09:43:00",
  "deleted_at": null
}

# Attributes

Field Type Rule Description
id string Unique identifier for the category.
name* string updatable Name of the category.
name_localized string nullable updatable Localized name of the category.
reference string nullable updatable User friendly unique reference for the category
image string nullable updatable The link of the category image
discounts array updatable includable List of Discount objects attached to the category.
timed_events array updatable includable List of Timed Event objects attached to the category.
products array updatable includable List of Products objects attached to the category.
combos array updatable includable List of Combos objects attached to the category.
giftCardProducts array updatable includable List of Gift Card Products objects attached to the category.
created_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the category was created.
updated_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the category was updated.
deleted_at string nullable Time YYYY-MM-DD HH-MM-SS in UTC at which the category was deleted.

# List Categories

GET /categories

# Scope

general.read

# Filters

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

# Response

{
  "data": [
    {
      "id": "8d161995",
      "name": "Meals",
      "name_localized": null,
      "reference": "cat-01",
      "image": "https://mywebsite.com/image.png",
      "discounts": [
        {
          "id": "8d90b7rr"
        }
      ],
      "timed_events": [
        {
          "id": "8d90b7ff"
        }
      ],
      "products": [
        {
          "id": "8d90b7dd"
        }
      ],
      "combos": [
        {
          "id": "8eda78a5"
        }
      ],
      "gift_card_products": [
        {
          "id": "8d969736"
        }
      ],
      "created_at": "2019-02-27 09:43:00",
      "updated_at": "2019-02-27 09:43:00",
      "deleted_at": null
    }
  ]
}

# Get Category

GET /categories/{categoryId}

# Scope

general.read

# Response

{
  "data": {
    "id": "8d161995",
    "name": "Meals",
    "name_localized": null,
    "reference": "cat-01",
    "image": "https://mywebsite.com/image.png",
    "discounts": [
      {
        "id": "8d90b7rr"
      }
    ],
    "timed_events": [
      {
        "id": "8d90b7ff"
      }
    ],
    "products": [
      {
        "id": "8d90b7dd"
      }
    ],
    "combos": [
      {
        "id": "8eda78a5"
      }
    ],
    "gift_card_products": [
      {
        "id": "8d969736"
      }
    ],
    "created_at": "2019-02-27 09:43:00",
    "updated_at": "2019-02-27 09:43:00",
    "deleted_at": null
  }
}

# Create Category

POST /categories

# Scope

menu.write

# Request

{
    "name": "Drinks",
    "name_localized": null,
    "reference": "cat-01",
    "image": "https://mywebsite.com/image.png",
    "discounts": [
        {
            "id": "8d161995"
        }
    ],
    "timed_events": [
        {
            "id": "8d161995"
        }
    ]
}

# Response

{
  "data": {
    "id": "8d161995",
    "name": "Meals",
    "name_localized": null,
    "reference": "cat-01",
    "image": "https://mywebsite.com/image.png",
    "discounts": [
      {
        "id": "8d90b7rr"
      }
    ],
    "timed_events": [
      {
        "id": "8d90b7ff"
      }
    ],
    "products": [
      {
        "id": "8d90b7dd"
      }
    ],
    "combos": [
      {
        "id": "8eda78a5"
      }
    ],
    "gift_card_products": [
      {
        "id": "8d969736"
      }
    ],
    "created_at": "2019-02-27 09:43:00",
    "updated_at": "2019-02-27 09:43:00",
    "deleted_at": null
  }
}

# Update Category

PUT /categories/{categoryId}

# Scope

menu.write

# Request

{
    "name": "Drinks",
    "name_localized": null,
    "reference": "cat-01",
    "image": "https://mywebsite.com/image.png",
    "discounts": [
        {
            "id": "8d161995"
        }
    ],
    "timed_events": [
        {
            "id": "8d161995"
        }
    ]
}

# Response

{
  "data": {
    "id": "8d161995",
    "name": "Meals",
    "name_localized": null,
    "reference": "cat-01",
    "image": "https://mywebsite.com/image.png",
    "discounts": [
      {
        "id": "8d90b7rr"
      }
    ],
    "timed_events": [
      {
        "id": "8d90b7ff"
      }
    ],
    "products": [
      {
        "id": "8d90b7dd"
      }
    ],
    "combos": [
      {
        "id": "8eda78a5"
      }
    ],
    "gift_card_products": [
      {
        "id": "8d969736"
      }
    ],
    "created_at": "2019-02-27 09:43:00",
    "updated_at": "2019-02-27 09:43:00",
    "deleted_at": null
  }
}

# Delete Category

DELETE /categories/{categoryId}

# Scope

menu.write The API will respond with 200 indicating that the category has been deleted.

# Restore Category

PUT /categories/{categoryId}/restore

# Scope

admin.restore The API will respond with 200 indicating that the category has been restored.

Last Updated: 2/9/2023, 2:14:02 PM