Skip to main content
POST
/
menu
/
import
Import menu
curl --request POST \
  --url https://app.xmenu.it/api/menu/import \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Id: <api-key>' \
  --header 'X-Client-Secret: <api-key>' \
  --data '
{
  "pos_uid": "<string>",
  "update_mode": "replace",
  "categories": [
    {
      "ext_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "image": "<string>",
      "hidden": true,
      "position": 123,
      "options": [
        {
          "ext_id": "<string>",
          "name": "<string>",
          "short_name": "<string>",
          "type": "single",
          "min_selectable": 123,
          "max_selectable": 123,
          "max_quantity": 123,
          "note": "<string>",
          "hidden": true,
          "position": 123,
          "primary": true,
          "first_default": true,
          "show_caption": true,
          "print_caption": true,
          "option_values": [
            {
              "ext_id": "<string>",
              "name": "<string>",
              "short_name": "<string>",
              "price_operator": "+",
              "price_operand": 123,
              "hidden": true,
              "checked_default": true,
              "position": 123
            }
          ]
        }
      ]
    }
  ],
  "products": [
    {
      "ext_id": "<string>",
      "category_ext_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "price": 123,
      "prices_table": {},
      "image": "<string>",
      "hidden": true,
      "position": 123,
      "inherits_options": "sync",
      "options": [
        {
          "ext_id": "<string>",
          "name": "<string>",
          "short_name": "<string>",
          "type": "single",
          "min_selectable": 123,
          "max_selectable": 123,
          "max_quantity": 123,
          "note": "<string>",
          "hidden": true,
          "position": 123,
          "primary": true,
          "first_default": true,
          "show_caption": true,
          "print_caption": true,
          "option_values": [
            {
              "ext_id": "<string>",
              "name": "<string>",
              "short_name": "<string>",
              "price_operator": "+",
              "price_operand": 123,
              "hidden": true,
              "checked_default": true,
              "position": 123
            }
          ]
        }
      ]
    }
  ]
}
'
{
"success": true,
"error": "<string>",
"message": "<string>"
}
write:menu
Each entity includes the ext_id field, which must be populated with its own unique identifier.If an element of the same entity with this ext_id does not already exist, a new one will be created. If the element exists, its content will be updated.The uniqueness scope of this ID is internal to the environment defined by the Client ID (X-Client-Id), meaning the same ext_id imported from different Client IDs will generate distinct elements.The ext_id values for options and option_values can be unique in that environment or only within their respective parent element (category/product for options, option for option_values).

Authorizations

X-Client-Id
string
header
required

Client ID for API Client authentication (must be used together with Client Secret)

X-Client-Secret
string
header
required

Client Secret for API Client authentication (must be used together with Client ID)

Body

application/json
pos_uid
string
required

Point-of-sale identifier

update_mode
enum<string>
required

Update mode:

  • replace = Full replacement
  • merge = Append new items
Available options:
replace,
merge
categories
object[]

Array of categories. Required if update_mode = replace

products
object[]

Array of products. Required if update_mode = replace

Response

Menu import response

success
boolean
required

Operation result: true if successful, false if failed

error
string

Error code if the operation failed. Possible values:

  • IMPORT_ERROR = Error during import (consult message parameter for details)

See Error codes for general error codes that may also occur.

message
string

Error description if the import failed