{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenQloud POS App API",
    "version": "v1",
    "description": "### Introduction\nConnect your POS software to the OpenQloud standard to exchange restaurant catalogs, availability and orders through APIs and webhooks.\n\n### Access\nManage your developer account and integration credentials in the OpenQloud console: https://console.openqloud.com. API calls use x-api-server-access-token and the connection-specific x-api-user-access-token. Restaurant sign-in and applications belong to your software or middleware, not this API.\n\n### API environment\nProduction base URL: https://api.openqloud.com/pos-app/v1. Local development URLs are not public production endpoints.\n\n### Integration guide\nPublish products, variants, option categories and menus; exchange availability and receive order notifications through your configured webhook. Your middleware or POS owns its user interface. OpenQloud supplies the shared API and data standard.\n\nDocumentation: https://www.openqloud.com/en/docs/pos-app-api/"
  },
  "servers": [
    {
      "url": "https://api.openqloud.com/pos-app/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Bulk (Modern POS)",
      "description": "Batch and snapshot operations recommended for modern POS integrations."
    },
    {
      "name": "Single Items (Legacy POS)",
      "description": "Individual product, product-option and menu operations retained for legacy POS integrations."
    },
    {
      "name": "Orders (Modern POS)",
      "description": "Modern POS integrations receive `new_order` and `order_status_changed` notifications through HTTP webhooks. The notification payload and the order APIs are shared with Legacy POS; only the real-time delivery channel differs."
    },
    {
      "name": "Orders (Legacy POS)",
      "description": "Order notifications are delivered to the HTTP webhook configured for your integration. OpenQloud Core does not currently provide a WebSocket notification channel.",
      "externalDocs": {
        "description": "Order notifications are delivered to the HTTP webhook configured for your integration. OpenQloud Core does not currently provide a WebSocket notification channel.",
        "url": "https://www.openqloud.com/en/docs/pos-app-api/"
      }
    },
    {
      "name": "Consumers",
      "description": "Consumer actions"
    },
    {
      "name": "Discounts",
      "description": "Discounts action"
    },
    {
      "name": "SellingPoints",
      "description": "Selling point action"
    },
    {
      "name": "Data Sync - Tickets",
      "description": "Operational tickets for Data Sync. Data Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset)."
    },
    {
      "name": "Data Sync - POS References",
      "description": "POS references for Data Sync (products, variants, modifiers, menus). Data Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset)."
    },
    {
      "name": "Data Sync - Categories",
      "description": "Data Sync: Create product categories"
    },
    {
      "name": "Data Sync - Zones",
      "description": "Data Sync: Create zones (restaurant areas)"
    },
    {
      "name": "Data Sync - Tables",
      "description": "Data Sync: Create tables (within zones)"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Content & Catalog",
      "tags": [
        "Bulk (Modern POS)",
        "Single Items (Legacy POS)",
        "Consumers",
        "Discounts",
        "SellingPoints"
      ]
    },
    {
      "name": "Orders",
      "tags": [
        "Orders (Modern POS)",
        "Orders (Legacy POS)"
      ]
    },
    {
      "name": "Data Sync",
      "tags": [
        "Data Sync - Tickets",
        "Data Sync - POS References",
        "Data Sync - Categories",
        "Data Sync - Zones",
        "Data Sync - Tables"
      ]
    }
  ],
  "security": [
    {
      "ServerAccessToken": [],
      "UserAccessToken": []
    }
  ],
  "paths": {
    "/sellingPoints/{sellingPointId}/menu-preimports": {
      "post": {
        "operationId": "createMenuPreimport",
        "summary": "Create a staged menu import",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Staged menu import",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/menu-preimports/{preimportId}": {
      "get": {
        "operationId": "getMenuPreimport",
        "summary": "Read a staged menu import",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "preimportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Staged menu import",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/menu-preimports/{preimportId}/selection": {
      "patch": {
        "operationId": "updateMenuPreimportSelection",
        "summary": "Update the selection of a staged menu import",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "preimportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated staged menu import",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/menu-preimports/{preimportId}/apply": {
      "post": {
        "operationId": "applyMenuPreimport",
        "summary": "Apply a staged menu import",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "preimportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Applied menu collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/menus/audit": {
      "get": {
        "operationId": "getMenusAudit",
        "summary": "Read menu materialization state",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Menu audit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/menus/copy-active-from-selling-point": {
      "post": {
        "operationId": "copyActiveMenusFromSellingPoint",
        "summary": "Copy the active menu catalogue from another accessible selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sourceSellingPointId"
                ],
                "properties": {
                  "sourceSellingPointId": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Copied menu collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/menus/send": {
      "post": {
        "operationId": "sendSellingPointMenus",
        "summary": "Force publishing the current menu collection",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current menu collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/live-data/sales": {
      "post": {
        "operationId": "requestLiveSales",
        "summary": "Request a live sales refresh",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Refresh request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/deliveries/{deliveryId}": {
      "get": {
        "operationId": "getDelivery",
        "summary": "Read a delivery visible to the authenticated POS",
        "parameters": [
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delivery",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Delivery not found"
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/deliveries/active": {
      "get": {
        "operationId": "getSellingPointActiveDeliveries",
        "summary": "List active deliveries for a selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Active deliveries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/liquidationMethods": {
      "get": {
        "operationId": "getSellingPointLiquidationMethods",
        "summary": "List the liquidation methods available to a selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liquidation methods",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/qodes": {
      "get": {
        "operationId": "getSellingPointQodes",
        "summary": "List the QR codes of a selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "QR codes and download URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "qodes",
                    "downloadUrl"
                  ],
                  "properties": {
                    "qodes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "downloadUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/selfDeliveryConfig": {
      "get": {
        "operationId": "getSellingPointSelfDeliveryConfig",
        "summary": "Read the self-delivery configuration",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Self-delivery configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchSellingPointSelfDeliveryConfig",
        "summary": "Update the self-delivery configuration",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated self-delivery configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/vats": {
      "get": {
        "operationId": "getSellingPointVats",
        "summary": "List the VAT rates available to a selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "VAT rates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/actions/{actionCode}": {
      "post": {
        "operationId": "executeSellingPointAction",
        "summary": "Execute an action in the selling point module setups",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "actionCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Action results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/truncate": {
      "post": {
        "operationId": "truncateSellingPointData",
        "summary": "Remove the mutable POS catalog of a selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Truncation result",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/definition.json": {
      "get": {
        "operationId": "getDefinition",
        "summary": "Get the POS App API definition",
        "security": [],
        "responses": {
          "200": {
            "description": "The public POS App API definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/info": {
      "get": {
        "operationId": "getInfo",
        "summary": "Get POS API runtime information",
        "responses": {
          "200": {
            "description": "Runtime information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/dispatch": {
      "get": {
        "operationId": "getDispatchData",
        "summary": "Get orders for dispatch",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "onlyActive",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dispatch data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "monitorData",
                    "orders"
                  ],
                  "properties": {
                    "monitorData": {
                      "type": "object",
                      "required": [
                        "totalOrders"
                      ],
                      "properties": {
                        "totalOrders": {
                          "type": "integer"
                        }
                      }
                    },
                    "orders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DispatchOrder"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/consumers": {
      "get": {
        "operationId": "getSellingPointConsumers",
        "summary": "List consumers available to the selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "loadAccount",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Consumers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putSellingPointConsumer",
        "summary": "Create or replace a consumer",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Consumer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/consumers/{consumerId}": {
      "patch": {
        "operationId": "patchSellingPointConsumer",
        "summary": "Update a consumer",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "consumerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Consumer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/consumers/{consumerId}/orders": {
      "get": {
        "operationId": "getSellingPointConsumerOrders",
        "summary": "List a consumer's orders",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "consumerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/sellingPoints": {
      "get": {
        "operationId": "getAuthenticatedUserSellingPoints",
        "summary": "List selling points for the authenticated POS user",
        "tags": [
          "POS App"
        ],
        "x-implementation-status": "native-sgk",
        "x-parity-status": "binary-certified-local",
        "responses": {
          "200": {
            "description": "Byte-compatible selling point list",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": 1108,
                    "uuid": null,
                    "name": "Example Restaurant",
                    "address": null,
                    "phone": null,
                    "email": null,
                    "logo": null,
                    "mainImage": null,
                    "mainImageLarge": null,
                    "listImage": null,
                    "listImageLarge": null,
                    "type": null,
                    "allowedOrderTypes": [],
                    "urlKey": "example-restaurant",
                    "description": null,
                    "schedule": null,
                    "tags": [],
                    "timezone": "Europe/Madrid",
                    "requiredPostalCode": false,
                    "currency": {
                      "isoCode": "EUR",
                      "symbol": "€",
                      "displayPattern": "{{ amount }}€",
                      "minorUnit": 2
                    },
                    "customStatusMessage": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Legacy invalid session response"
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/orders/pending": {
      "get": {
        "operationId": "getPendingSellingPointOrders",
        "summary": "List pending POS orders",
        "tags": [
          "POS App"
        ],
        "x-implementation-status": "native-sgk",
        "x-parity-status": "binary-certified-local",
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 1108
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Byte-compatible pending order list",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": 201,
                    "status": {
                      "code": "waiting_sp_validation"
                    },
                    "totalAmount": 21,
                    "type": "delivery"
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/menus/collectionRaw": {
      "get": {
        "summary": "Get raw menu collection",
        "description": "Returns the complete current menu catalog as a bulk snapshot. The response body uses the same contract accepted by `PATCH /sellingPoints/{sellingPointId}/menus/collectionRaw`, so it can be stored, modified if required, and sent back without conversion. It includes menus, schedules, sections, products, variants, product-option categories, options, prices, images, tags, canonical allergen codes and translations. This read operation has no publishing or catalog mutation side effects. The returned control flags are `false`; set them explicitly before a later PATCH if publishing or another optional behavior is required.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Current raw menu collection, ready to be sent to the matching PATCH operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MenuCollectionRawInputData"
                },
                "example": {
                  "autoSelection": false,
                  "sendAllMenusToChannels": false,
                  "preserveProductPresentation": false,
                  "menus": [
                    {
                      "externalId": "menu-takeaway",
                      "name": "Takeaway menu",
                      "type": "menu",
                      "public": true,
                      "allowedOrderTypes": [
                        "collection"
                      ],
                      "scheduleId": 310,
                      "menuSections": [
                        {
                          "externalId": "burgers",
                          "name": "Burgers",
                          "position": 1,
                          "products": [
                            {
                              "externalId": "classic-burger",
                              "name": "Classic burger",
                              "price": {
                                "amount": 12,
                                "vatValue": 10
                              },
                              "public": true,
                              "featured": false,
                              "isAvailable": true,
                              "productVariants": [],
                              "productOptionsCategories": [],
                              "tags": [],
                              "allergens": [
                                "gluten"
                              ],
                              "translations": {}
                            }
                          ],
                          "translations": {}
                        }
                      ],
                      "translations": {}
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk (Modern POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "patch": {
        "summary": "Patch menu collection",
        "description": "Replaces the complete menu catalog for the selling point. This operation is destructive: menus, sections, products, variants, product-option categories and options omitted from `menus` are removed or disabled. Always send the full desired catalog, never a partial fragment. Products and variants accept `allergens` as an array of canonical string codes from https://api.openqloud.com/public-data/v1/allergens. Unknown codes return HTTP 400 before persistence. Sending `allergens: []` removes every allergen assignment; omitting `allergens` preserves current assignments. `translations` are persisted for menus, sections, products, variants, product-option categories and product options. Catalog-preservation mode preserves existing OpenQloud-managed product and option content while still applying prices, availability, allergens, translations and relationships. When `sendAllMenusToChannels` is true, the committed catalog response is returned first and each configured channel webhook is then delivered and tracked independently.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MenuCollectionRawInputData"
              },
              "example": {
                "autoSelection": true,
                "menus": [
                  {
                    "name": "Our menu",
                    "type": "menu",
                    "externalId": "XXX",
                    "public": true,
                    "allowedOrderTypes": [
                      "delivery",
                      "collection",
                      "insitu",
                      "inside"
                    ],
                    "schedule": {
                      "name": "Our menu schedule",
                      "scheduleRanges": [
                        {
                          "startDay": 1,
                          "endDay": 1,
                          "startTime": "07:00",
                          "endTime": "10:30"
                        },
                        {
                          "startDay": 2,
                          "endDay": 2,
                          "startTime": "07:00",
                          "endTime": "10:30"
                        },
                        {
                          "startDay": 3,
                          "endDay": 3,
                          "startTime": "07:00",
                          "endTime": "10:30"
                        },
                        {
                          "startDay": 4,
                          "endDay": 4,
                          "startTime": "07:00",
                          "endTime": "10:30"
                        },
                        {
                          "startDay": 5,
                          "endDay": 5,
                          "startTime": "07:00",
                          "endTime": "10:30"
                        },
                        {
                          "startDay": 6,
                          "endDay": 6,
                          "startTime": "10:00",
                          "endTime": "16:30"
                        },
                        {
                          "startDay": 6,
                          "endDay": 6,
                          "startTime": "20:00",
                          "endTime": "23:59"
                        },
                        {
                          "startDay": 7,
                          "endDay": 7,
                          "startTime": "13:00",
                          "endTime": "23:59"
                        }
                      ]
                    },
                    "menuSections": [
                      {
                        "externalId": "12-345",
                        "name": "Maldito Tacos",
                        "image": "https://example.com/9583836866_9583837391_13601746437668bebidas.png",
                        "position": 11,
                        "products": [
                          {
                            "name": "MEADLE EAST GREEN",
                            "externalId": "101-113-6-5",
                            "price": {
                              "amount": 10,
                              "amountA": null,
                              "amountB": null,
                              "amountC": null,
                              "amountD": null,
                              "vatValue": 10
                            },
                            "public": true,
                            "featured": false,
                            "isAvailable": true,
                            "addProductOptionsToVariants": false,
                            "productVariants": [],
                            "tags": [],
                            "allergens": [
                              "gluten",
                              "dairy"
                            ],
                            "image": "https://xxxxx.com/sfsdf.png",
                            "productOptionsCategories": [
                              {
                                "externalId": null,
                                "name": "Extras",
                                "minSelection": 0,
                                "maxSelection": 100,
                                "maxSameOptionSelection": 100,
                                "productOptions": [
                                  {
                                    "externalId": "102-114--",
                                    "name": "EXTRA PAN",
                                    "price": {
                                      "amount": 1,
                                      "amountA": null,
                                      "amountB": null,
                                      "amountC": null,
                                      "amountD": null,
                                      "vatValue": 10
                                    },
                                    "translations": {
                                      "es": {
                                        "name": "Translated name"
                                      }
                                    }
                                  },
                                  {
                                    "externalId": "103-115--",
                                    "name": "EXTRA QUESO AZUL",
                                    "price": {
                                      "amount": 1,
                                      "amountA": null,
                                      "amountB": null,
                                      "amountC": null,
                                      "amountD": null,
                                      "vatValue": 10
                                    },
                                    "translations": {
                                      "es": {
                                        "name": "Translated name"
                                      }
                                    }
                                  },
                                  {
                                    "externalId": "104-116--",
                                    "name": "EXTRA QUESO FETA",
                                    "price": {
                                      "amount": 1,
                                      "amountA": null,
                                      "amountB": null,
                                      "amountC": null,
                                      "amountD": null,
                                      "vatValue": 10
                                    },
                                    "translations": {
                                      "es": {
                                        "name": "Translated name"
                                      }
                                    }
                                  },
                                  {
                                    "externalId": "105-117--",
                                    "name": "EXTRA TOSTADAS CEREALES",
                                    "price": {
                                      "amount": 1,
                                      "amountA": null,
                                      "amountB": null,
                                      "amountC": null,
                                      "amountD": null,
                                      "vatValue": 10
                                    },
                                    "translations": {
                                      "es": {
                                        "name": "Translated name"
                                      }
                                    }
                                  },
                                  {
                                    "externalId": "106-118--",
                                    "name": "EXTRA TOTOPOS",
                                    "price": {
                                      "amount": 1,
                                      "amountA": null,
                                      "amountB": null,
                                      "amountC": null,
                                      "amountD": null,
                                      "vatValue": 10
                                    },
                                    "translations": {
                                      "es": {
                                        "name": "Translated name"
                                      }
                                    }
                                  },
                                  {
                                    "externalId": "107-119--",
                                    "name": "EXTRA PESTO WHEATGRASS",
                                    "price": {
                                      "amount": 1,
                                      "amountA": null,
                                      "amountB": null,
                                      "amountC": null,
                                      "amountD": null,
                                      "vatValue": 10
                                    },
                                    "translations": {
                                      "es": {
                                        "name": "Translated name"
                                      }
                                    }
                                  }
                                ],
                                "translations": {
                                  "es": {
                                    "name": "Translated name"
                                  }
                                }
                              }
                            ],
                            "translations": {
                              "es": {
                                "name": "Translated name"
                              }
                            }
                          }
                        ],
                        "translations": {
                          "es": {
                            "name": "Translated name"
                          }
                        }
                      }
                    ],
                    "translations": {
                      "es": {
                        "name": "Translated name"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosMenuCollectionRaw"
                },
                "example": {
                  "success": true,
                  "httpResponseCode": 200,
                  "code": null,
                  "message": "OK",
                  "errors": [],
                  "data": [
                    {
                      "id": 41001,
                      "externalId": "menu-takeaway",
                      "name": "Takeaway menu",
                      "type": "menu",
                      "public": true,
                      "allowedOrderTypes": [
                        "collection"
                      ],
                      "menuSections": [
                        {
                          "id": 42001,
                          "externalId": "burgers",
                          "name": "Burgers",
                          "position": 1,
                          "products": [
                            {
                              "id": 43001,
                              "externalId": "classic-burger",
                              "name": "Classic burger",
                              "price": {
                                "amount": 12,
                                "vatValue": 10
                              },
                              "public": true,
                              "featured": false,
                              "isAvailable": true,
                              "productVariants": [],
                              "productOptionsCategories": [],
                              "tags": [],
                              "allergens": [
                                "gluten"
                              ],
                              "translations": {}
                            }
                          ],
                          "translations": {}
                        }
                      ],
                      "translations": {}
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk (Modern POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/images": {
      "put": {
        "summary": "Upload a selling-point image",
        "description": "Creates or reuses an image from raw Base64 content. The file extension is detected from the binary PNG, JPEG or GIF payload. The image is associated with the selling point and exposes the legacy File variants used by POS catalogue clients.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "filenameWithoutExtension",
                  "base64"
                ],
                "properties": {
                  "filenameWithoutExtension": {
                    "type": "string",
                    "example": "NAV-ITEM-001"
                  },
                  "base64": {
                    "type": "string",
                    "description": "Raw Base64 image content without a data-URI prefix."
                  }
                }
              },
              "example": {
                "filenameWithoutExtension": "menu",
                "base64": "iVBORw0KGgoAAAANSUhEUg=="
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image created or reused",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "originalFile",
                    "thumbnailFile",
                    "productGridFile",
                    "listFile"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "originalFile": {
                      "$ref": "#/components/schemas/LegacyImageFile"
                    },
                    "thumbnailFile": {
                      "$ref": "#/components/schemas/LegacyImageFile"
                    },
                    "productGridFile": {
                      "$ref": "#/components/schemas/LegacyImageFile"
                    },
                    "listFile": {
                      "$ref": "#/components/schemas/LegacyImageFile"
                    }
                  }
                },
                "example": {
                  "id": 251,
                  "name": "menu",
                  "location": "https://fixture.invalid/menu.png",
                  "active": true,
                  "originalFile": {
                    "id": 252,
                    "title": "menu.png",
                    "location": "https://fixture.invalid/menu.png"
                  },
                  "thumbnailFile": null,
                  "productGridFile": null,
                  "standardProductGridFile": null,
                  "listFile": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported image payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Images (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/itemsAvailability": {
      "get": {
        "summary": "Get items availability",
        "description": "Get availability status for products, product variants and product options for a selling point. Every item includes the internal OpenQloud `id` and, when configured, the `externalId` assigned by the consuming POS. The PATCH operation on this same path accepts either identifier. Use `externalId` to operate exclusively with POS catalogue references, or `id` to preserve the historical OpenQloud contract. Items are distinguished by `type`: `PRODUCT` or `PRODUCT_OPTION`. For grouped availability (categories/collections), use getSellingPointMenus + getSellingPointMenu.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemsAvailabilityResponse"
                },
                "example": [
                  {
                    "id": 409969,
                    "externalId": "POS-PRODUCT-123",
                    "type": "PRODUCT",
                    "available": false
                  },
                  {
                    "id": 747154,
                    "externalId": "POS-OPTION-456",
                    "type": "PRODUCT_OPTION",
                    "available": true
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk (Modern POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "patch": {
        "summary": "Patch items availability",
        "description": "Update availability for multiple products and/or product options in one batch. Each item accepts either the internal OpenQloud `id` (the backward-compatible OpenQloud format) or the `externalId` assigned by the consuming POS. Both modes can be mixed in one request. If one item contains both fields, `externalId` takes precedence, including when it contains only digits. References are resolved within the selling point and item type. Unknown references return `404 ITEM_NOT_FOUND`; duplicated external references return `409 ITEM_REFERENCE_NOT_UNIQUE`. Set `sendToChannels` to propagate changes to configured channels.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemsAvailabilityPatchRequest"
              },
              "examples": {
                "usingExternalIds": {
                  "summary": "Use identifiers assigned by the consuming POS",
                  "value": {
                    "items": [
                      {
                        "externalId": "POS-PRODUCT-123",
                        "type": "PRODUCT",
                        "available": false
                      },
                      {
                        "externalId": "POS-OPTION-456",
                        "type": "PRODUCT_OPTION",
                        "available": true
                      }
                    ],
                    "sendToChannels": true
                  }
                },
                "usingIds": {
                  "summary": "Use the backward-compatible OpenQloud format",
                  "value": {
                    "items": [
                      {
                        "id": 409969,
                        "type": "PRODUCT",
                        "available": false
                      },
                      {
                        "id": 747154,
                        "type": "PRODUCT_OPTION",
                        "available": true
                      }
                    ],
                    "sendToChannels": true
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemsAvailabilityPatchResponse"
                },
                "example": {
                  "items": [
                    {
                      "externalId": "POS-PRODUCT-123",
                      "type": "PRODUCT",
                      "available": false
                    }
                  ],
                  "sendToChannels": true
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          },
          "404": {
            "description": "The supplied product or product-option reference does not exist in this selling point.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The supplied externalId is not unique for this item type in the selling point.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk (Modern POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/serviceZones": {
      "get": {
        "operationId": "getSellingPointServiceZones",
        "summary": "List zones and service locations",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service zones",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Selling point not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Service zones"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "post": {
        "operationId": "createSellingPointServiceZone",
        "summary": "Create a service zone",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created service zone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Service zones"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "patch": {
        "summary": "Patch zones and tables",
        "description": "Create and modify the restaurant zones and tables",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PatchServiceZonesData"
                  },
                  {
                    "type": "object",
                    "maxProperties": 0
                  }
                ]
              },
              "example": [
                {
                  "code": "BAR",
                  "externalId": 1,
                  "name": "Barra",
                  "serviceLocations": [
                    {
                      "code": "B1",
                      "externalId": "B1",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B1",
                      "securityCode": null
                    },
                    {
                      "code": "B2",
                      "externalId": "B2",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B2",
                      "securityCode": null
                    },
                    {
                      "code": "B3",
                      "externalId": "B3",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B3",
                      "securityCode": null
                    },
                    {
                      "code": "B4",
                      "externalId": "B4",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B4",
                      "securityCode": null
                    },
                    {
                      "code": "B5",
                      "externalId": "B5",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B5",
                      "securityCode": null
                    },
                    {
                      "code": "B6",
                      "externalId": "B6",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B6",
                      "securityCode": null
                    },
                    {
                      "code": "B7",
                      "externalId": "B7",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B7",
                      "securityCode": null
                    },
                    {
                      "code": "B8",
                      "externalId": "B8",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B8",
                      "securityCode": null
                    },
                    {
                      "code": "B9",
                      "externalId": "B9",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B9",
                      "securityCode": null
                    },
                    {
                      "code": "B10",
                      "externalId": "B10",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "B10",
                      "securityCode": null
                    }
                  ]
                },
                {
                  "code": "TER",
                  "externalId": 2,
                  "name": "Terraza",
                  "serviceLocations": [
                    {
                      "code": "T1",
                      "externalId": "T1",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T1",
                      "securityCode": null
                    },
                    {
                      "code": "T2",
                      "externalId": "T2",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T2",
                      "securityCode": null
                    },
                    {
                      "code": "T3",
                      "externalId": "T3",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T3",
                      "securityCode": null
                    },
                    {
                      "code": "T4",
                      "externalId": "T4",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T4",
                      "securityCode": null
                    },
                    {
                      "code": "T5",
                      "externalId": "T5",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T5",
                      "securityCode": null
                    },
                    {
                      "code": "T6",
                      "externalId": "T6",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T6",
                      "securityCode": null
                    },
                    {
                      "code": "T7",
                      "externalId": "T7",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T7",
                      "securityCode": null
                    },
                    {
                      "code": "T8",
                      "externalId": "T8",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "T8",
                      "securityCode": null
                    }
                  ]
                },
                {
                  "code": "SAL",
                  "externalId": 3,
                  "name": "Salón",
                  "serviceLocations": [
                    {
                      "code": "S1",
                      "externalId": "S1",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S1",
                      "securityCode": null
                    },
                    {
                      "code": "S2",
                      "externalId": "S2",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S2",
                      "securityCode": null
                    },
                    {
                      "code": "S3",
                      "externalId": "S3",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S3",
                      "securityCode": null
                    },
                    {
                      "code": "S4",
                      "externalId": "S4",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S4",
                      "securityCode": null
                    },
                    {
                      "code": "S5",
                      "externalId": "S5",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S5",
                      "securityCode": null
                    },
                    {
                      "code": "S6",
                      "externalId": "S6",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S6",
                      "securityCode": null
                    },
                    {
                      "code": "S7",
                      "externalId": "S7",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S7",
                      "securityCode": null
                    },
                    {
                      "code": "S8",
                      "externalId": "S8",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S8",
                      "securityCode": null
                    },
                    {
                      "code": "S9",
                      "externalId": "S9",
                      "maxDiners": 0,
                      "minDiners": 0,
                      "name": "S9",
                      "securityCode": null
                    }
                  ]
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk (Modern POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/serviceZones/{serviceZoneId}": {
      "get": {
        "operationId": "getSellingPointServiceZone",
        "summary": "Get a service zone",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "serviceZoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service zone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service zone not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Service zones"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "patch": {
        "operationId": "updateSellingPointServiceZone",
        "summary": "Update a service zone",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "serviceZoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated service zone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service zone not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Service zones"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "post": {
        "operationId": "createServiceLocation",
        "summary": "Create a service location in a zone",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "serviceZoneId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created service location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service zone not found"
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/productsCollection": {
      "put": {
        "summary": "Put products collection",
        "description": "Core-compatible bulk product upsert for integrations. Send an array of product payloads (or an object with a `products` array). Each item is matched by OpenQloud `id` when present, otherwise by the POS `externalId`; unmatched items are created. The response is an array of complete products. This endpoint is distinct from the destructive menu collection operation.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ProductInputData"
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "products"
                    ],
                    "properties": {
                      "products": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ProductInputData"
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/ProductInputData"
                    }
                  }
                ]
              },
              "example": {
                "products": [
                  {
                    "externalId": "fixture-72"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Complete products saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Products"
                },
                "example": [
                  {
                    "id": 72,
                    "name": "Imported fixture"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk (Modern POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/products/rewrite": {
      "patch": {
        "summary": "Rewrite product collection",
        "description": "Core-compatible product rewrite used by integrations. Accepts the same product array as `PUT /productsCollection`, a product map keyed by external identifier, or either collection wrapped in `products`; Catalog-preservation mode preserves OpenQloud-managed name, description and image fields while applying the remaining product data. Returns complete products.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ProductInputData"
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/ProductInputData"
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "products"
                    ],
                    "properties": {
                      "products": {
                        "oneOf": [
                          {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/ProductInputData"
                            }
                          },
                          {
                            "type": "object",
                            "additionalProperties": {
                              "$ref": "#/components/schemas/ProductInputData"
                            }
                          }
                        ]
                      },
                      "params": {
                        "type": "object",
                        "properties": {
                          "preserveProductPresentation": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                ]
              },
              "example": {
                "products": [
                  {
                    "externalId": "fixture-73"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Complete products rewritten",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Products"
                },
                "example": [
                  {
                    "id": 73,
                    "name": "Rewritten fixture"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk (Modern POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/products": {
      "get": {
        "summary": "Get products",
        "description": "Returns first-level selling-point products as partial products for performance. Product variants remain nested inside their parent products. Without `externalId`, the operation returns the complete list. With `externalId`, it reproduces the OpenQloud lookup using the identifier assigned by the consuming POS and returns an array containing the matching partial product, or an empty array. Alias for full detail: `GET /sellingPoints/{sellingPointId}/products/external/{externalId}`.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "onlyPublicProducts",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Load only public products. False by default if the parameter is not send",
              "example": true
            },
            "description": "Load only public products. False by default if the parameter is not send"
          },
          {
            "name": "externalId",
            "in": "query",
            "required": false,
            "description": "Product identifier assigned by the consuming POS. Core-compatible lookup. Returns a partial-product array; use the documented alias route when full product detail is required.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "POS-PRODUCT-123"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Products"
                },
                "example": [
                  {
                    "id": 23211,
                    "externalId": null,
                    "name": "First Product Name",
                    "image": null,
                    "price": {
                      "amount": 6.5,
                      "vatValue": 10
                    },
                    "inMenuPrice": null,
                    "public": false,
                    "featured": false,
                    "translations": {
                      "es": {
                        "name": "Translated name"
                      }
                    }
                  },
                  {
                    "id": 23519,
                    "externalId": null,
                    "name": "Second Product Name",
                    "image": null,
                    "price": {
                      "amount": 8.95,
                      "vatValue": 10
                    },
                    "inMenuPrice": null,
                    "public": false,
                    "featured": false,
                    "translations": {
                      "es": {
                        "name": "Translated name"
                      }
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "post": {
        "summary": "Post product",
        "description": "Creates a product and its optional variants. `price` is the standalone price and `inMenuPrice` is the increment inside a set menu. `productOptionsIds` assigns existing modifiers. `allergens` accepts only canonical string codes published by https://api.openqloud.com/public-data/v1/allergens; unknown codes return HTTP 400 and no product is created. Use `allergens: []` for an explicitly allergen-free product. Variants may declare their own `allergens` and `translations`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInputData"
              },
              "example": {
                "name": "Cheese Burger",
                "externalId": "{YOUR POS REFERENCE}",
                "price": {
                  "amount": 11.75,
                  "amountA": 11.75,
                  "amountB": 11.75,
                  "amountC": 11.75,
                  "amountD": 11.75,
                  "vatValue": "10"
                },
                "inMenuPrice": {
                  "amount": 3.2,
                  "amountA": 3.2,
                  "amountB": 3.2,
                  "amountC": 3.2,
                  "amountD": 3.2,
                  "vatValue": "10"
                },
                "shortDescription": "Burger with cheddar",
                "description": "Using our best bread...",
                "image": "https://example.com/image.jpg",
                "public": true,
                "featured": false,
                "isAvailable": true,
                "addProductOptionsToVariants": false,
                "productVariants": [
                  {
                    "name": "King Size",
                    "externalId": "external_reference",
                    "shortDescription": "Biggest size",
                    "price": {
                      "amount": 14.45,
                      "amountA": 14.45,
                      "amountB": 14.45,
                      "amountC": 14.45,
                      "amountD": 14.45,
                      "vatValue": 10
                    },
                    "translations": {
                      "es": {
                        "name": "Translated name",
                        "shortDescription": "Translated short description"
                      }
                    }
                  }
                ],
                "tags": [
                  "Cheddar",
                  "Premium"
                ],
                "productOptionsIds": [
                  1443,
                  2552,
                  1123
                ],
                "allergens": [
                  "gluten",
                  "dairy"
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description",
                    "description": "Translated description"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosProduct"
                },
                "example": {
                  "id": 121,
                  "externalId": "POS-PRODUCT-121",
                  "name": "Example pizza",
                  "image": null,
                  "price": {
                    "amount": 12.5,
                    "vatValue": 10
                  },
                  "inMenuPrice": null,
                  "isAvailable": true,
                  "public": true,
                  "featured": false
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/products/external/{externalId}": {
      "get": {
        "summary": "Get product using POS external ID",
        "description": "Returns all product information using the `externalId` assigned by the consuming POS. This is the explicit full-detail alias of the compatible lookup `GET /sellingPoints/{sellingPointId}/products?externalId={externalId}`, which returns a partial-product array. The lookup is scoped to the selling point. The historical `GET /sellingPoints/{sellingPointId}/products/{productId}` remains available and continues to use the internal OpenQloud ID.",
        "operationId": "getSellingPointProductByExternalId",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            }
          },
          {
            "name": "externalId",
            "in": "path",
            "required": true,
            "description": "Product identifier assigned by the consuming POS.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "POS-PRODUCT-123"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product found using the POS external ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosProduct"
                },
                "example": {
                  "id": 7301,
                  "externalId": "classic-burger",
                  "urlKey": "7301-classic-burger",
                  "name": "Classic burger",
                  "shortDescription": "Beef burger with lettuce and tomato",
                  "description": null,
                  "image": null,
                  "largeImage": null,
                  "standardImage": null,
                  "price": {
                    "amount": 12,
                    "vatValue": 10
                  },
                  "minOrderPreparationMinutes": 0,
                  "minMinutesOrderInAdvance": 0,
                  "inMenuPrice": null,
                  "menuSections": [],
                  "tags": [],
                  "parentName": null,
                  "isAvailable": true,
                  "productVariants": [],
                  "productOptions": [],
                  "public": true,
                  "featured": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No active product has this externalId in the selling point.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The externalId identifies more than one active product in the selling point.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/products/{productId}": {
      "get": {
        "summary": "Get product using OpenQloud ID",
        "description": "Returns all product information using the internal OpenQloud product ID. For the identifier assigned by the consuming POS, use `GET /sellingPoints/{sellingPointId}/products/external/{externalId}`.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Product identifier",
              "example": 121
            },
            "description": "Product identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosProduct"
                },
                "example": {
                  "id": 121,
                  "externalId": "POS-PRODUCT-121",
                  "name": "Example pizza",
                  "image": null,
                  "price": {
                    "amount": 12.5,
                    "vatValue": 10
                  },
                  "inMenuPrice": null,
                  "isAvailable": true,
                  "public": true,
                  "featured": false
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "patch": {
        "summary": "Patch product",
        "description": "Partially updates a product and optionally its variants. Omitted fields are preserved. Omitting `allergens` preserves current assignments, `allergens: []` clears them, and a non-empty array replaces them using canonical codes from https://api.openqloud.com/public-data/v1/allergens. Unknown codes return HTTP 400 before mutation. `translations` are upserted by ISO language code. Delete a variant through the product DELETE operation using its identifier.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInputData"
              },
              "example": {
                "name": "Cheese Burger",
                "externalId": "{YOUR POS REFERENCE}",
                "price": {
                  "amount": 11.75,
                  "amountA": 11.75,
                  "amountB": 11.75,
                  "amountC": 11.75,
                  "amountD": 11.75,
                  "vatValue": "10"
                },
                "inMenuPrice": {
                  "amount": 3.2,
                  "amountA": 3.2,
                  "amountB": 3.2,
                  "amountC": 3.2,
                  "amountD": 3.2,
                  "vatValue": "10"
                },
                "shortDescription": "Burger with cheddar",
                "description": "Using our best bread...",
                "image": "https://example.com/image.jpg",
                "public": true,
                "featured": false,
                "isAvailable": true,
                "addProductOptionsToVariants": false,
                "productVariants": [
                  {
                    "name": "King Size",
                    "externalId": "external_reference",
                    "shortDescription": "Biggest size",
                    "price": {
                      "amount": 14.45,
                      "amountA": 14.45,
                      "amountB": 14.45,
                      "amountC": 14.45,
                      "amountD": 14.45,
                      "vatValue": 10
                    },
                    "translations": {
                      "es": {
                        "name": "Translated name",
                        "shortDescription": "Translated short description"
                      }
                    }
                  }
                ],
                "tags": [
                  "Cheddar",
                  "Premium"
                ],
                "productOptionsIds": [
                  1443,
                  2552,
                  1123
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description",
                    "description": "Translated description"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Product identifier",
              "example": 121
            },
            "description": "Product identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosProduct"
                },
                "example": {
                  "id": 121,
                  "externalId": "POS-PRODUCT-121",
                  "name": "Updated example pizza",
                  "image": null,
                  "price": {
                    "amount": 12.5,
                    "vatValue": 10
                  },
                  "inMenuPrice": null,
                  "isAvailable": true,
                  "public": true,
                  "featured": false
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "delete": {
        "summary": "Delete product",
        "description": "Delete product and its product variants, but you can use only to delete product variant using product variant identifier in the url as productId parameter",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Product identifier",
              "example": 1294147
            },
            "description": "Product identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": true
              }
            }
          },
          "400": {
            "description": "The selling point or product path identifier is not a positive integer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "INVALID_PRODUCT_ID",
                      "message": "Product id must be a positive integer"
                    }
                  ],
                  "code": "INVALID_PRODUCT_ID",
                  "message": "Product id must be a positive integer",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/productOptionsCategories": {
      "get": {
        "summary": "Get product option categories",
        "description": "Get selling point product option categories",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductOptionCategories"
                },
                "example": [
                  {
                    "id": "102",
                    "name": "Our ingredients",
                    "shortDescription": "What do you put on your pizza?",
                    "position": 1,
                    "maxSelection": 10,
                    "minSelection": null,
                    "maxSameOptionSelection": 2,
                    "selectionLabel": "Max. 10",
                    "productOptions": [
                      {
                        "id": "233",
                        "name": "Cheddar",
                        "shortDescription": "Add cheddar to your pizza",
                        "position": 1,
                        "isAvailable": true,
                        "price": {
                          "amount": 0.75,
                          "vatValue": 10
                        },
                        "translations": {
                          "es": {
                            "name": "Translated name",
                            "shortDescription": "Translated short description"
                          }
                        }
                      }
                    ],
                    "translations": {
                      "es": {
                        "name": "Translated name",
                        "shortDescription": "Translated short description"
                      }
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "post": {
        "summary": "Post product options category",
        "description": "Create product options category",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductOptionsCategoryInputData"
              },
              "example": {
                "name": "Extras",
                "externalId": "external_reference",
                "shortDescription": "Using our best bread...",
                "minOptions": 2,
                "maxOptions": 3,
                "maxSameOptionSelection": 2,
                "position": 1,
                "productOptions": [
                  {
                    "name": "Extra bacon",
                    "externalId": "external_reference",
                    "shortDescription": "Fried bacon",
                    "price": {
                      "amount": 1.5,
                      "amountA": null,
                      "amountB": null,
                      "amountC": null,
                      "amountD": null,
                      "vatValue": 10
                    },
                    "position": 1,
                    "isAvailable": true,
                    "translations": {
                      "es": {
                        "name": "Translated name",
                        "shortDescription": "Translated short description"
                      }
                    }
                  }
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductOptionsCategory"
                },
                "example": {
                  "id": "102",
                  "name": "Our ingredients",
                  "shortDescription": "What do you put on your pizza?",
                  "position": 1,
                  "maxSelection": 10,
                  "minSelection": null,
                  "maxSameOptionSelection": 2,
                  "selectionLabel": "Max. 10",
                  "productOptions": [
                    {
                      "id": "233",
                      "name": "Cheddar",
                      "shortDescription": "Add cheddar to your pizza",
                      "position": 1,
                      "isAvailable": true,
                      "price": {
                        "amount": 0.75,
                        "vatValue": 10
                      },
                      "translations": {
                        "es": {
                          "name": "Translated name",
                          "shortDescription": "Translated short description"
                        }
                      }
                    }
                  ],
                  "translations": {
                    "es": {
                      "name": "Translated name",
                      "shortDescription": "Translated short description"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/productOptionsCategories/{productOptionCategoryId}": {
      "get": {
        "summary": "Get product options category",
        "description": "Get product options category by identifier",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "productOptionCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Product Option Category identifier",
              "example": 131
            },
            "description": "Product Option Category identifier"
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductOptionsCategory"
                },
                "example": {
                  "id": "102",
                  "name": "Our ingredients",
                  "shortDescription": "What do you put on your pizza?",
                  "position": 1,
                  "maxSelection": 10,
                  "minSelection": null,
                  "maxSameOptionSelection": 2,
                  "selectionLabel": "Max. 10",
                  "productOptions": [
                    {
                      "id": "233",
                      "name": "Cheddar",
                      "shortDescription": "Add cheddar to your pizza",
                      "position": 1,
                      "isAvailable": true,
                      "price": {
                        "amount": 0.75,
                        "vatValue": 10
                      },
                      "translations": {
                        "es": {
                          "name": "Translated name",
                          "shortDescription": "Translated short description"
                        }
                      }
                    }
                  ],
                  "translations": {
                    "es": {
                      "name": "Translated name",
                      "shortDescription": "Translated short description"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "patch": {
        "summary": "Patch product options category",
        "description": "\n        Modify product options category and it's product options. To delete a product option use <a href='https://www.openqloud.com/en/docs/'>deleteSellingPointProductOption</a><br>\n        ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductOptionsCategoryInputDataPatch"
              },
              "example": {
                "name": "Extras",
                "externalId": "external_reference",
                "shortDescription": "Using our best bread...",
                "minOptions": 2,
                "maxOptions": 3,
                "maxSameOptionSelection": 2,
                "position": 1,
                "productOptions": [
                  {
                    "name": "Extra bacon",
                    "externalId": "external_reference",
                    "shortDescription": "Fried bacon",
                    "price": {
                      "amount": 1.5,
                      "vatValue": 10
                    },
                    "position": 1,
                    "isAvailable": true,
                    "id": 6621,
                    "translations": {
                      "es": {
                        "name": "Translated name",
                        "shortDescription": "Translated short description"
                      }
                    }
                  }
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "productOptionCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Product Option Category identifier",
              "example": 131
            },
            "description": "Product Option Category identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductOptionsCategory"
                },
                "example": {
                  "id": "102",
                  "name": "Our ingredients",
                  "shortDescription": "What do you put on your pizza?",
                  "position": 1,
                  "maxSelection": 10,
                  "minSelection": null,
                  "maxSameOptionSelection": 2,
                  "selectionLabel": "Max. 10",
                  "productOptions": [
                    {
                      "id": "233",
                      "name": "Cheddar",
                      "shortDescription": "Add cheddar to your pizza",
                      "position": 1,
                      "isAvailable": true,
                      "price": {
                        "amount": 0.75,
                        "vatValue": 10
                      },
                      "translations": {
                        "es": {
                          "name": "Translated name",
                          "shortDescription": "Translated short description"
                        }
                      }
                    }
                  ],
                  "translations": {
                    "es": {
                      "name": "Translated name",
                      "shortDescription": "Translated short description"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "delete": {
        "summary": "Delete product options category",
        "description": "Delete product options category and it's product options",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "productOptionCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Product Option Category identifier",
              "example": 102
            },
            "description": "Product Option Category identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": true
              }
            }
          },
          "400": {
            "description": "The selling point or product option category path identifier is not a positive integer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "INVALID_PRODUCT_OPTION_CATEGORY_ID",
                      "message": "Product option category id must be a positive integer"
                    }
                  ],
                  "code": "INVALID_PRODUCT_OPTION_CATEGORY_ID",
                  "message": "Product option category id must be a positive integer",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/productOptionsCategories/{productOptionCategoryId}/productOptions/{productOptionId}": {
      "delete": {
        "summary": "Delete product option",
        "description": "Delete product option",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "productOptionCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Product Option Category identifier",
              "example": 131
            },
            "description": "Product Option Category identifier"
          },
          {
            "name": "productOptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Product Option identifier",
              "example": 132
            },
            "description": "Product Option identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": true
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/menus/collection": {
      "post": {
        "summary": "Post menus",
        "description": "Create new menus or set menus for given selling point",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/MenuCollectionInputData"
                  },
                  {
                    "type": "object",
                    "required": [
                      "menus"
                    ],
                    "properties": {
                      "menus": {
                        "$ref": "#/components/schemas/MenuCollectionInputData"
                      }
                    }
                  }
                ]
              },
              "example": [
                {
                  "name": "Set Menu name",
                  "externalId": "ext_m1",
                  "type": "setmenu",
                  "position": 1,
                  "public": true,
                  "allowedOrderTypes": [
                    "delivery",
                    "collection",
                    "insitu"
                  ],
                  "availableFrom": "2019-01-01T00:00:00+0000",
                  "availableTo": "2019-07-01T00:00:00+0000",
                  "price": {
                    "amount": 16.9,
                    "vatValue": 10
                  },
                  "shortDescription": "Set menu description",
                  "menuSections": [
                    {
                      "externalId": "ext_ms_1",
                      "name": "First set menu section name",
                      "shortDescription": "First set menu section description",
                      "position": 1,
                      "minSelection": 1,
                      "maxSelection": 1,
                      "productsIds": [
                        34332,
                        34333,
                        34334,
                        34335
                      ],
                      "translations": {
                        "es": {
                          "name": "Translated name",
                          "shortDescription": "Translated short description"
                        }
                      }
                    },
                    {
                      "externalId": "ext_ms_1",
                      "name": "Second set menu section name",
                      "shortDescription": "Second set menu section description",
                      "position": 1,
                      "minSelection": 1,
                      "maxSelection": 1,
                      "productsIds": [
                        39371,
                        39372,
                        39373,
                        39374
                      ],
                      "translations": {
                        "es": {
                          "name": "Translated name",
                          "shortDescription": "Translated short description"
                        }
                      }
                    }
                  ],
                  "scheduleId": null,
                  "translations": {
                    "es": {
                      "name": "Translated name",
                      "shortDescription": "Translated short description"
                    }
                  }
                },
                {
                  "name": "Menu name",
                  "externalId": "ext_m2",
                  "type": "menu",
                  "position": 2,
                  "public": true,
                  "allowedOrderTypes": [
                    "delivery",
                    "collection",
                    "insitu"
                  ],
                  "shortDescription": "Menu description",
                  "menuSections": [
                    {
                      "externalId": "ext_ms_3",
                      "name": "First menu section name",
                      "shortDescription": "First menu section description",
                      "position": 1,
                      "productsIds": [
                        12391,
                        12392,
                        12393,
                        12394
                      ],
                      "translations": {
                        "es": {
                          "name": "Translated name",
                          "shortDescription": "Translated short description"
                        }
                      }
                    },
                    {
                      "externalId": "ext_ms_4",
                      "name": "Second menu section name",
                      "shortDescription": "Second menu section description",
                      "position": 2,
                      "productsIds": [
                        99211,
                        99212,
                        99213,
                        99214
                      ],
                      "translations": {
                        "es": {
                          "name": "Translated name",
                          "shortDescription": "Translated short description"
                        }
                      }
                    }
                  ],
                  "translations": {
                    "es": {
                      "name": "Translated name",
                      "shortDescription": "Translated short description"
                    }
                  }
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosMenu"
                },
                "example": [
                  {
                    "id": 141,
                    "externalId": "dinner",
                    "name": "Example dinner menu",
                    "type": "menu",
                    "public": true
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/menus/{menuId}": {
      "patch": {
        "summary": "Patch menu",
        "description": "Update menu information",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "menuId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Menu identifier",
              "example": 141
            },
            "description": "Menu identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MenuInputData"
              },
              "example": {
                "id": 77261,
                "name": "New menu name",
                "externalId": "new_set_menu_external_id",
                "type": "setmenu",
                "position": 3,
                "public": true,
                "allowedOrderTypes": [
                  "delivery",
                  "collection"
                ],
                "availableFrom": "2017-02-01T00:00:00+0000",
                "availableTo": "2017-02-12T00:00:00+0000",
                "price": {
                  "amount": 12.75,
                  "vatValue": 10
                },
                "shortDescription": "New set menu description",
                "menuSections": [
                  {
                    "id": 223991,
                    "externalId": "new_menu_section_external_id",
                    "name": "New menu section name",
                    "shortDescription": "New menu section description",
                    "position": 1,
                    "minSelection": 1,
                    "maxSelection": 1,
                    "productsIds": [
                      321212,
                      321213,
                      321214
                    ],
                    "translations": {
                      "es": {
                        "name": "Translated name",
                        "shortDescription": "Translated short description"
                      }
                    }
                  },
                  {
                    "id": 223992
                  },
                  {
                    "externalId": "new_menu_section_created_external_id",
                    "name": "New menu section created name",
                    "shortDescription": "New menu section created description",
                    "position": 2,
                    "minSelection": 1,
                    "maxSelection": 1,
                    "productsIds": [
                      55321,
                      55322,
                      55323
                    ],
                    "translations": {
                      "es": {
                        "name": "Translated name",
                        "shortDescription": "Translated short description"
                      }
                    }
                  }
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosMenu"
                },
                "example": {
                  "id": 141,
                  "externalId": "dinner",
                  "name": "Updated example dinner menu",
                  "type": "menu",
                  "public": true
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "get": {
        "summary": "Get menu",
        "description": " Menu properties:<br>             <br><b>type</b>             <ul>             <li><b>menu:</b> Typical restaurant menu with pizzas or wines for example. This kind of menu doesn't have price, and are their products who has the price.              </li><li><b>setmenu:</b> This menu has price and the consumer has to select a required number of products for each section. Some products can modify the menu final price.</li>             </ul>Understanding the differences between menu/setmenu is easy to understand that menu section properties minSelection and maxSelection only apply to setmenu menus.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "menuId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Menu identifier",
              "example": 141
            },
            "description": "Menu identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosMenu"
                },
                "example": {
                  "id": 141,
                  "externalId": "dinner",
                  "name": "Example dinner menu",
                  "type": "menu",
                  "public": true
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "delete": {
        "summary": "Delete menu",
        "description": "Delete menu",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "menuId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Menu identifier",
              "example": 141
            },
            "description": "Menu identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": true
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/menus": {
      "get": {
        "summary": "Get menus",
        "description": "\n            This method return all selling point menus as \"partial menu\" to improve performance.<br>\n            To get all menu information you can use <a href='https://www.openqloud.com/en/docs/'>getSellingPointMenu</a>\n    ",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema19623"
                },
                "example": [
                  {
                    "id": 543,
                    "name": "Pizzas",
                    "type": "menu",
                    "position": 1,
                    "allowedOrderTypes": [
                      "delivery",
                      "collection",
                      "insitu",
                      "inside"
                    ],
                    "price": null,
                    "public": true,
                    "externalId": "external_reference",
                    "translations": {
                      "es": {
                        "name": "Translated name"
                      }
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Single Items (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/orders/{orderId}": {
      "get": {
        "summary": "Get order",
        "description": "Get an order by identifier. The HTTP endpoint is shared by Modern POS and Legacy POS. The response is polymorphic and selected by `type`: `collection`, `delivery`, `insitu`, `reservation` or `inside`. All variants contain the common Order fields; delivery adds delivery data, insitu and reservation add dinersNumber, and inside adds dinersNumber and serviceLocation.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Order identifier",
              "example": 201
            },
            "description": "Order identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "id": 101,
                  "type": "delivery",
                  "totalAmount": 18
                },
                "x-legacy-delivery-example": {
                  "id": 422429,
                  "orderGroupId": null,
                  "totalAmount": 58.85,
                  "executionTimeLabel": "hoy 24/07 a las 07:05h",
                  "preparationTimeLabel": "hoy 24/07 a las 06:55h",
                  "comment": "This is the order comment!",
                  "cancellationComment": null,
                  "consumer": {
                    "id": 19077,
                    "name": "Client_99041",
                    "lastname": "Lastname_99041",
                    "email": null,
                    "phone": "+34600000000",
                    "image": null,
                    "notificationsChannel": "d4788ad4deca6d07937eac0dbc96aef0",
                    "chatToken": null,
                    "posClientId": null,
                    "marketClientId": null
                  },
                  "status": {
                    "code": "waiting_sp_validation",
                    "name": "Esperando validación del negocio",
                    "color": "#f7981d",
                    "isFinalStatus": false,
                    "globalStatusCode": "processing"
                  },
                  "type": "delivery",
                  "sellingPoint": {
                    "id": 3961,
                    "name": "SuperPizza",
                    "address": {
                      "id": 16187,
                      "street": "Carrer de la Tecnologia, 17",
                      "details": "",
                      "city": "Viladecans",
                      "province": "Barcelona",
                      "postalCode": "08840",
                      "latitude": 41.31372,
                      "longitude": 2.031222,
                      "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                      "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                      "autoGeolocated": true
                    },
                    "phone": "+34900000000",
                    "email": "superpizza@example.com",
                    "logo": "https://example.com/e4cd836538_f79efe5783_82291551976531iconImagesqd2mt.png",
                    "mainImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
                    "mainImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
                    "listImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
                    "listImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
                    "type": "Pizzería",
                    "urlKey": "superpizza-viladecans",
                    "timezone": "Europe/Madrid"
                  },
                  "payments": [
                    {
                      "id": 55066,
                      "amount": 58.85,
                      "paymentMethodName": "Efectivo",
                      "prepaid": false,
                      "methodCode": "CASH",
                      "status": {
                        "code": "CREATED",
                        "name": "Iniciado",
                        "color": "#000000",
                        "isFinalStatus": false
                      }
                    }
                  ],
                  "orderLines": [
                    {
                      "type": "PRODUCT",
                      "totalAmount": 11.5,
                      "unitPrice": 11.5,
                      "quantity": 1,
                      "label": "Pizza de la huerta",
                      "comment": "Comment 1",
                      "childrenOrderLines": [
                        {
                          "type": "PRODUCT_OPTION",
                          "totalAmount": 0.5,
                          "unitPrice": 0.5,
                          "quantity": 1,
                          "label": "Cebolla",
                          "comment": null,
                          "childrenOrderLines": [],
                          "baseAmount": 0.45,
                          "vatAmount": 0.05,
                          "vatValue": 10,
                          "productOption": {
                            "id": 234820,
                            "externalId": null
                          }
                        }
                      ],
                      "baseAmount": 10.45,
                      "vatAmount": 1.05,
                      "vatValue": 10,
                      "product": {
                        "id": 109838,
                        "externalId": null
                      }
                    },
                    {
                      "type": "PRODUCT",
                      "totalAmount": 41.85,
                      "unitPrice": 13.95,
                      "quantity": 3,
                      "label": "Pizza 4 estaciones",
                      "comment": null,
                      "childrenOrderLines": [
                        {
                          "type": "PRODUCT_OPTION",
                          "totalAmount": 1,
                          "unitPrice": 1,
                          "quantity": 1,
                          "label": "Champiñones",
                          "comment": null,
                          "childrenOrderLines": [],
                          "baseAmount": 0.91,
                          "vatAmount": 0.09,
                          "vatValue": 10,
                          "productOption": {
                            "id": 234818,
                            "externalId": null
                          }
                        }
                      ],
                      "baseAmount": 38.05,
                      "vatAmount": 3.8,
                      "vatValue": 10,
                      "product": {
                        "id": 109839,
                        "externalId": null
                      }
                    },
                    {
                      "type": "PRODUCT",
                      "totalAmount": 4.5,
                      "unitPrice": 1.5,
                      "quantity": 3,
                      "label": "Agua 0.5L",
                      "comment": null,
                      "childrenOrderLines": [],
                      "baseAmount": 4.09,
                      "vatAmount": 0.41,
                      "vatValue": 10,
                      "product": {
                        "id": 109841,
                        "externalId": null
                      }
                    },
                    {
                      "type": "DELIVERY",
                      "totalAmount": 1,
                      "unitPrice": 1,
                      "quantity": 1,
                      "label": "Delivery cost",
                      "comment": null,
                      "childrenOrderLines": [],
                      "baseAmount": 0.83,
                      "vatAmount": 0.17,
                      "vatValue": 21,
                      "distance": 0
                    }
                  ],
                  "isCancellable": true,
                  "isAcceptable": true,
                  "baseAmount": 53.42,
                  "vatAmount": 5.43,
                  "currency": {
                    "isoCode": "EUR",
                    "symbol": "€",
                    "displayPattern": "{{ amount }}€"
                  },
                  "market": {
                    "id": 554,
                    "name": "SuperMarketplace",
                    "darkLogo": null,
                    "lightLogo": null,
                    "horizontalLogo": null,
                    "squareLogo": null
                  },
                  "createdAt": "2020-07-24T04:25:53+0000",
                  "preparationTime": "2020-07-24T04:55:53+0000",
                  "isAsap": false,
                  "posOrderId": null,
                  "marketOrderId": "99041",
                  "marketOrderCode": "VLV3CW",
                  "executionTime": "2020-07-24T05:05:53+0000",
                  "deliveryAmount": 1,
                  "deliveryAddress": {
                    "id": 16343,
                    "street": "Carrer de la Tecnologia, 17",
                    "details": null,
                    "city": "Viladecans",
                    "province": "Barcelona",
                    "postalCode": "08840",
                    "latitude": 41.31372,
                    "longitude": 2.031222,
                    "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                    "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                    "autoGeolocated": true
                  },
                  "deliveries": [
                    {
                      "id": 285638,
                      "status": {
                        "code": "WAITING_SELLING_POINT_ACCEPTANCE",
                        "name": "Esperando aceptación punto de venta",
                        "color": "#f7981d",
                        "isFinalStatus": false
                      },
                      "driver": null,
                      "deliveryAccountName": null,
                      "deliveryAccountPhone": null,
                      "pickupAddress": {
                        "id": 16187,
                        "street": "Carrer de la Tecnologia, 17",
                        "details": "",
                        "city": "Viladecans",
                        "province": "Barcelona",
                        "postalCode": "08840",
                        "latitude": 41.31372,
                        "longitude": 2.031222,
                        "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                        "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                        "autoGeolocated": true
                      },
                      "pickupAgreedAt": "2020-07-24T04:55:53+0000",
                      "pickupConfirmedAt": "2020-07-24T04:55:53+0000",
                      "deliveryAddress": {
                        "id": 16343,
                        "street": "Carrer de la Tecnologia, 17",
                        "details": null,
                        "city": "Viladecans",
                        "province": "Barcelona",
                        "postalCode": "08840",
                        "latitude": 41.31372,
                        "longitude": 2.031222,
                        "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                        "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                        "autoGeolocated": true
                      },
                      "deliveryAgreedAt": "2020-07-24T05:05:53+0000",
                      "deliveryConfirmedAt": "2020-07-24T05:05:53+0000",
                      "deliveryInstructions": null,
                      "forSenderInstructions": null,
                      "linearDistance": 0,
                      "realDistance": null,
                      "route": null,
                      "estimatedDeliveryDuration": 0,
                      "destinationContactEmail": null,
                      "destinationContactName": "Client_99041 · Lastname_99041",
                      "destinationContactPhone": "600000000",
                      "isSelfDelivery": true,
                      "trackingUrl": "https://example.com/tracking/example"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders (Modern POS)",
          "Orders (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "patch": {
        "operationId": "updateOrder",
        "summary": "Update an order",
        "description": "Update an order using the compatibility fields posOrderId, deliveryAddress and clientPhoneNumber. Other fields are ignored, including internal metadata, status, amounts, order type and consumer objects. Empty values do not clear the POS reference. Address and phone changes require their domain validation and side effects; accepting a request does not certify completion of those operations.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "orderId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Order not found"
          }
        }
      }
    },
    "/orders/{orderId}/actions": {
      "get": {
        "summary": "Get order actions (token)",
        "description": "Get all possible actions allowed for a specific order. When sending any of the given action tokens, the order status will be changed.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Order identifier",
              "example": 201
            },
            "description": "Order identifier"
          },
          {
            "name": "delayMinutes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "description": "Request order options using delay minutes",
              "example": 0
            },
            "description": "Request order options using delay minutes"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema20551"
                },
                "example": [
                  {
                    "token": "NzY0MHxyZWFkeXwtMXwtMXwtMXwtMQ,,",
                    "callToAction": "Aceptar",
                    "color": "#5aac44",
                    "actionType": "ACCEPT",
                    "orderType": "collection",
                    "executionTime": "2017-10-12T10:10:00+0000",
                    "businessCost": null,
                    "delayMinutes": null,
                    "pickupTime": null,
                    "transportType": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders (Modern POS)",
          "Orders (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      },
      "post": {
        "summary": "Change order status (using order action token)",
        "description": "Change order status using order action token",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Order action token",
                    "example": "string"
                  },
                  "cancellationComment": {
                    "type": "string",
                    "description": "Required for type CANCEL actions",
                    "example": "string"
                  }
                },
                "required": [
                  "token"
                ]
              },
              "example": {
                "token": "string",
                "cancellationComment": "string"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Order identifier",
              "example": 201
            },
            "description": "Order identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "id": 101,
                  "status": {
                    "code": "accepted"
                  },
                  "totalAmount": 18
                },
                "x-legacy-delivery-example": {
                  "id": 422429,
                  "orderGroupId": null,
                  "totalAmount": 58.85,
                  "executionTimeLabel": "hoy 24/07 a las 07:05h",
                  "preparationTimeLabel": "hoy 24/07 a las 06:55h",
                  "comment": "This is the order comment!",
                  "cancellationComment": null,
                  "consumer": {
                    "id": 19077,
                    "name": "Client_99041",
                    "lastname": "Lastname_99041",
                    "email": null,
                    "phone": "+34600000000",
                    "image": null,
                    "notificationsChannel": "d4788ad4deca6d07937eac0dbc96aef0",
                    "chatToken": null,
                    "posClientId": null,
                    "marketClientId": null
                  },
                  "status": {
                    "code": "waiting_sp_validation",
                    "name": "Esperando validación del negocio",
                    "color": "#f7981d",
                    "isFinalStatus": false,
                    "globalStatusCode": "processing"
                  },
                  "type": "delivery",
                  "sellingPoint": {
                    "id": 3961,
                    "name": "SuperPizza",
                    "address": {
                      "id": 16187,
                      "street": "Carrer de la Tecnologia, 17",
                      "details": "",
                      "city": "Viladecans",
                      "province": "Barcelona",
                      "postalCode": "08840",
                      "latitude": 41.31372,
                      "longitude": 2.031222,
                      "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                      "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                      "autoGeolocated": true
                    },
                    "phone": "+34900000000",
                    "email": "superpizza@example.com",
                    "logo": "https://example.com/e4cd836538_f79efe5783_82291551976531iconImagesqd2mt.png",
                    "mainImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
                    "mainImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
                    "listImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
                    "listImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
                    "type": "Pizzería",
                    "urlKey": "superpizza-viladecans",
                    "timezone": "Europe/Madrid"
                  },
                  "payments": [
                    {
                      "id": 55066,
                      "amount": 58.85,
                      "paymentMethodName": "Efectivo",
                      "prepaid": false,
                      "methodCode": "CASH",
                      "status": {
                        "code": "CREATED",
                        "name": "Iniciado",
                        "color": "#000000",
                        "isFinalStatus": false
                      }
                    }
                  ],
                  "orderLines": [
                    {
                      "type": "PRODUCT",
                      "totalAmount": 11.5,
                      "unitPrice": 11.5,
                      "quantity": 1,
                      "label": "Pizza de la huerta",
                      "comment": "Comment 1",
                      "childrenOrderLines": [
                        {
                          "type": "PRODUCT_OPTION",
                          "totalAmount": 0.5,
                          "unitPrice": 0.5,
                          "quantity": 1,
                          "label": "Cebolla",
                          "comment": null,
                          "childrenOrderLines": [],
                          "baseAmount": 0.45,
                          "vatAmount": 0.05,
                          "vatValue": 10,
                          "productOption": {
                            "id": 234820,
                            "externalId": null
                          }
                        }
                      ],
                      "baseAmount": 10.45,
                      "vatAmount": 1.05,
                      "vatValue": 10,
                      "product": {
                        "id": 109838,
                        "externalId": null
                      }
                    },
                    {
                      "type": "PRODUCT",
                      "totalAmount": 41.85,
                      "unitPrice": 13.95,
                      "quantity": 3,
                      "label": "Pizza 4 estaciones",
                      "comment": null,
                      "childrenOrderLines": [
                        {
                          "type": "PRODUCT_OPTION",
                          "totalAmount": 1,
                          "unitPrice": 1,
                          "quantity": 1,
                          "label": "Champiñones",
                          "comment": null,
                          "childrenOrderLines": [],
                          "baseAmount": 0.91,
                          "vatAmount": 0.09,
                          "vatValue": 10,
                          "productOption": {
                            "id": 234818,
                            "externalId": null
                          }
                        }
                      ],
                      "baseAmount": 38.05,
                      "vatAmount": 3.8,
                      "vatValue": 10,
                      "product": {
                        "id": 109839,
                        "externalId": null
                      }
                    },
                    {
                      "type": "PRODUCT",
                      "totalAmount": 4.5,
                      "unitPrice": 1.5,
                      "quantity": 3,
                      "label": "Agua 0.5L",
                      "comment": null,
                      "childrenOrderLines": [],
                      "baseAmount": 4.09,
                      "vatAmount": 0.41,
                      "vatValue": 10,
                      "product": {
                        "id": 109841,
                        "externalId": null
                      }
                    },
                    {
                      "type": "DELIVERY",
                      "totalAmount": 1,
                      "unitPrice": 1,
                      "quantity": 1,
                      "label": "Delivery cost",
                      "comment": null,
                      "childrenOrderLines": [],
                      "baseAmount": 0.83,
                      "vatAmount": 0.17,
                      "vatValue": 21,
                      "distance": 0
                    }
                  ],
                  "isCancellable": true,
                  "isAcceptable": true,
                  "baseAmount": 53.42,
                  "vatAmount": 5.43,
                  "currency": {
                    "isoCode": "EUR",
                    "symbol": "€",
                    "displayPattern": "{{ amount }}€"
                  },
                  "market": {
                    "id": 554,
                    "name": "SuperMarketplace",
                    "darkLogo": null,
                    "lightLogo": null,
                    "horizontalLogo": null,
                    "squareLogo": null
                  },
                  "createdAt": "2020-07-24T04:25:53+0000",
                  "preparationTime": "2020-07-24T04:55:53+0000",
                  "isAsap": false,
                  "posOrderId": null,
                  "marketOrderId": "99041",
                  "marketOrderCode": "VLV3CW",
                  "executionTime": "2020-07-24T05:05:53+0000",
                  "deliveryAmount": 1,
                  "deliveryAddress": {
                    "id": 16343,
                    "street": "Carrer de la Tecnologia, 17",
                    "details": null,
                    "city": "Viladecans",
                    "province": "Barcelona",
                    "postalCode": "08840",
                    "latitude": 41.31372,
                    "longitude": 2.031222,
                    "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                    "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                    "autoGeolocated": true
                  },
                  "deliveries": [
                    {
                      "id": 285638,
                      "status": {
                        "code": "WAITING_SELLING_POINT_ACCEPTANCE",
                        "name": "Esperando aceptación punto de venta",
                        "color": "#f7981d",
                        "isFinalStatus": false
                      },
                      "driver": null,
                      "deliveryAccountName": null,
                      "deliveryAccountPhone": null,
                      "pickupAddress": {
                        "id": 16187,
                        "street": "Carrer de la Tecnologia, 17",
                        "details": "",
                        "city": "Viladecans",
                        "province": "Barcelona",
                        "postalCode": "08840",
                        "latitude": 41.31372,
                        "longitude": 2.031222,
                        "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                        "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                        "autoGeolocated": true
                      },
                      "pickupAgreedAt": "2020-07-24T04:55:53+0000",
                      "pickupConfirmedAt": "2020-07-24T04:55:53+0000",
                      "deliveryAddress": {
                        "id": 16343,
                        "street": "Carrer de la Tecnologia, 17",
                        "details": null,
                        "city": "Viladecans",
                        "province": "Barcelona",
                        "postalCode": "08840",
                        "latitude": 41.31372,
                        "longitude": 2.031222,
                        "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                        "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                        "autoGeolocated": true
                      },
                      "deliveryAgreedAt": "2020-07-24T05:05:53+0000",
                      "deliveryConfirmedAt": "2020-07-24T05:05:53+0000",
                      "deliveryInstructions": null,
                      "forSenderInstructions": null,
                      "linearDistance": 0,
                      "realDistance": null,
                      "route": null,
                      "estimatedDeliveryDuration": 0,
                      "destinationContactEmail": null,
                      "destinationContactName": "Client_99041 · Lastname_99041",
                      "destinationContactPhone": "600000000",
                      "isSelfDelivery": true,
                      "trackingUrl": "https://example.com/tracking/example"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders (Modern POS)",
          "Orders (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/orders/{orderId}/status": {
      "post": {
        "summary": "Change order status (using order status type code)",
        "description": "Change order status using order status type code. <br><br> Accepted values for <b>orderStatusTypeCode</b>\n<ul>\n<li><span style='font-weight: 500'>accepted</span></li>\n<li><span style='font-weight: 500'>preparation</span></li>\n<li><span style='font-weight: 500'>ready</span></li>\n<li><span style='font-weight: 500'>delivering</span>: Only allowed for delivery orders delivered by self drivers</li>\n<li><span style='font-weight: 500'>delivered</span>: Only allowed for delivery orders delivered by self drivers</li>\n<li><span style='font-weight: 500'>finished</span></li>\n<li><span style='font-weight: 500'>cancelled_by_sp</span>: In that case parameter \"cancellationReason\" is required</li>\n</ul>\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewOrderStatus"
              },
              "example": {
                "orderStatusTypeCode": "accepted",
                "cancellationReason": "",
                "delayMinutes": 10
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                },
                "example": {
                  "id": 101,
                  "status": {
                    "code": "accepted"
                  },
                  "totalAmount": 18
                },
                "x-legacy-delivery-example": {
                  "id": 422429,
                  "orderGroupId": null,
                  "totalAmount": 58.85,
                  "executionTimeLabel": "hoy 24/07 a las 07:05h",
                  "preparationTimeLabel": "hoy 24/07 a las 06:55h",
                  "comment": "This is the order comment!",
                  "cancellationComment": null,
                  "consumer": {
                    "id": 19077,
                    "name": "Client_99041",
                    "lastname": "Lastname_99041",
                    "email": null,
                    "phone": "+34600000000",
                    "image": null,
                    "notificationsChannel": "d4788ad4deca6d07937eac0dbc96aef0",
                    "chatToken": null,
                    "posClientId": null,
                    "marketClientId": null
                  },
                  "status": {
                    "code": "waiting_sp_validation",
                    "name": "Esperando validación del negocio",
                    "color": "#f7981d",
                    "isFinalStatus": false,
                    "globalStatusCode": "processing"
                  },
                  "type": "delivery",
                  "sellingPoint": {
                    "id": 3961,
                    "name": "SuperPizza",
                    "address": {
                      "id": 16187,
                      "street": "Carrer de la Tecnologia, 17",
                      "details": "",
                      "city": "Viladecans",
                      "province": "Barcelona",
                      "postalCode": "08840",
                      "latitude": 41.31372,
                      "longitude": 2.031222,
                      "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                      "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                      "autoGeolocated": true
                    },
                    "phone": "+34900000000",
                    "email": "superpizza@example.com",
                    "logo": "https://example.com/e4cd836538_f79efe5783_82291551976531iconImagesqd2mt.png",
                    "mainImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
                    "mainImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
                    "listImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
                    "listImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
                    "type": "Pizzería",
                    "urlKey": "superpizza-viladecans",
                    "timezone": "Europe/Madrid"
                  },
                  "payments": [
                    {
                      "id": 55066,
                      "amount": 58.85,
                      "paymentMethodName": "Efectivo",
                      "prepaid": false,
                      "methodCode": "CASH",
                      "status": {
                        "code": "CREATED",
                        "name": "Iniciado",
                        "color": "#000000",
                        "isFinalStatus": false
                      }
                    }
                  ],
                  "orderLines": [
                    {
                      "type": "PRODUCT",
                      "totalAmount": 11.5,
                      "unitPrice": 11.5,
                      "quantity": 1,
                      "label": "Pizza de la huerta",
                      "comment": "Comment 1",
                      "childrenOrderLines": [
                        {
                          "type": "PRODUCT_OPTION",
                          "totalAmount": 0.5,
                          "unitPrice": 0.5,
                          "quantity": 1,
                          "label": "Cebolla",
                          "comment": null,
                          "childrenOrderLines": [],
                          "baseAmount": 0.45,
                          "vatAmount": 0.05,
                          "vatValue": 10,
                          "productOption": {
                            "id": 234820,
                            "externalId": null
                          }
                        }
                      ],
                      "baseAmount": 10.45,
                      "vatAmount": 1.05,
                      "vatValue": 10,
                      "product": {
                        "id": 109838,
                        "externalId": null
                      }
                    },
                    {
                      "type": "PRODUCT",
                      "totalAmount": 41.85,
                      "unitPrice": 13.95,
                      "quantity": 3,
                      "label": "Pizza 4 estaciones",
                      "comment": null,
                      "childrenOrderLines": [
                        {
                          "type": "PRODUCT_OPTION",
                          "totalAmount": 1,
                          "unitPrice": 1,
                          "quantity": 1,
                          "label": "Champiñones",
                          "comment": null,
                          "childrenOrderLines": [],
                          "baseAmount": 0.91,
                          "vatAmount": 0.09,
                          "vatValue": 10,
                          "productOption": {
                            "id": 234818,
                            "externalId": null
                          }
                        }
                      ],
                      "baseAmount": 38.05,
                      "vatAmount": 3.8,
                      "vatValue": 10,
                      "product": {
                        "id": 109839,
                        "externalId": null
                      }
                    },
                    {
                      "type": "PRODUCT",
                      "totalAmount": 4.5,
                      "unitPrice": 1.5,
                      "quantity": 3,
                      "label": "Agua 0.5L",
                      "comment": null,
                      "childrenOrderLines": [],
                      "baseAmount": 4.09,
                      "vatAmount": 0.41,
                      "vatValue": 10,
                      "product": {
                        "id": 109841,
                        "externalId": null
                      }
                    },
                    {
                      "type": "DELIVERY",
                      "totalAmount": 1,
                      "unitPrice": 1,
                      "quantity": 1,
                      "label": "Delivery cost",
                      "comment": null,
                      "childrenOrderLines": [],
                      "baseAmount": 0.83,
                      "vatAmount": 0.17,
                      "vatValue": 21,
                      "distance": 0
                    }
                  ],
                  "isCancellable": true,
                  "isAcceptable": true,
                  "baseAmount": 53.42,
                  "vatAmount": 5.43,
                  "currency": {
                    "isoCode": "EUR",
                    "symbol": "€",
                    "displayPattern": "{{ amount }}€"
                  },
                  "market": {
                    "id": 554,
                    "name": "SuperMarketplace",
                    "darkLogo": null,
                    "lightLogo": null,
                    "horizontalLogo": null,
                    "squareLogo": null
                  },
                  "createdAt": "2020-07-24T04:25:53+0000",
                  "preparationTime": "2020-07-24T04:55:53+0000",
                  "isAsap": false,
                  "posOrderId": null,
                  "marketOrderId": "99041",
                  "marketOrderCode": "VLV3CW",
                  "executionTime": "2020-07-24T05:05:53+0000",
                  "deliveryAmount": 1,
                  "deliveryAddress": {
                    "id": 16343,
                    "street": "Carrer de la Tecnologia, 17",
                    "details": null,
                    "city": "Viladecans",
                    "province": "Barcelona",
                    "postalCode": "08840",
                    "latitude": 41.31372,
                    "longitude": 2.031222,
                    "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                    "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                    "autoGeolocated": true
                  },
                  "deliveries": [
                    {
                      "id": 285638,
                      "status": {
                        "code": "WAITING_SELLING_POINT_ACCEPTANCE",
                        "name": "Esperando aceptación punto de venta",
                        "color": "#f7981d",
                        "isFinalStatus": false
                      },
                      "driver": null,
                      "deliveryAccountName": null,
                      "deliveryAccountPhone": null,
                      "pickupAddress": {
                        "id": 16187,
                        "street": "Carrer de la Tecnologia, 17",
                        "details": "",
                        "city": "Viladecans",
                        "province": "Barcelona",
                        "postalCode": "08840",
                        "latitude": 41.31372,
                        "longitude": 2.031222,
                        "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                        "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                        "autoGeolocated": true
                      },
                      "pickupAgreedAt": "2020-07-24T04:55:53+0000",
                      "pickupConfirmedAt": "2020-07-24T04:55:53+0000",
                      "deliveryAddress": {
                        "id": 16343,
                        "street": "Carrer de la Tecnologia, 17",
                        "details": null,
                        "city": "Viladecans",
                        "province": "Barcelona",
                        "postalCode": "08840",
                        "latitude": 41.31372,
                        "longitude": 2.031222,
                        "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                        "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                        "autoGeolocated": true
                      },
                      "deliveryAgreedAt": "2020-07-24T05:05:53+0000",
                      "deliveryConfirmedAt": "2020-07-24T05:05:53+0000",
                      "deliveryInstructions": null,
                      "forSenderInstructions": null,
                      "linearDistance": 0,
                      "realDistance": null,
                      "route": null,
                      "estimatedDeliveryDuration": 0,
                      "destinationContactEmail": null,
                      "destinationContactName": "Client_99041 · Lastname_99041",
                      "destinationContactPhone": "600000000",
                      "isSelfDelivery": true,
                      "trackingUrl": "https://example.com/tracking/example"
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "Orders (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/orders": {
      "get": {
        "summary": "Get orders",
        "description": "Get selling point filtered orders",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          },
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "UTC date for the start of preparation, from 00:00:00 inclusive. Used only with endDate. Example: 2017-10-10",
              "example": "string"
            },
            "description": "Start-of-preparation date, applied only when both date bounds exist."
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "UTC date for the start of preparation, through 23:59:00 inclusive for compatibility. Used only with startDate. Example: 2017-10-10",
              "example": "string"
            },
            "description": "Start-of-preparation end date through 23:59:00 UTC inclusive, applied only with both date bounds."
          },
          {
            "name": "orderType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "One order type code or comma-separated codes: delivery, collection, insitu, reservation, inside. Applied only when both startDate and endDate are provided.",
              "example": "delivery"
            },
            "description": "One order type code or comma-separated codes. Applied only with both date bounds."
          },
          {
            "name": "globalStatusCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Used to filter by order global status code",
              "enum": [
                "completed",
                "processing",
                "pending"
              ],
              "example": "completed"
            },
            "description": "Used to filter by order global status code"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema20757"
                },
                "example": [
                  {
                    "id": 4912,
                    "totalAmount": 29.9,
                    "baseAmount": 27.18,
                    "vatAmount": 2.72,
                    "executionTimeLabel": "11/10 at 13:10h",
                    "executionTime": "2017-10-11T13:10:00+0000",
                    "comment": "Thank you",
                    "cancellationComment": null,
                    "consumer": {
                      "id": 1003,
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://example.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "posClientId": "CCCC-CCCC-CCCC",
                      "marketClientId": "MMMM-MMMM-MMMM",
                      "notificationsChannel": "549d70d0e0851200d11229c16f8d38a8b"
                    },
                    "status": {
                      "code": "waiting_sp_validation",
                      "name": "Waiting selling point validation",
                      "color": "#f7981d",
                      "isFinalStatus": false,
                      "globalStatusCode": "processing"
                    },
                    "type": "delivery",
                    "sellingPoint": {
                      "id": 3442,
                      "name": "My restaurant",
                      "address": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": 41.308166,
                        "longitude": 2.019725,
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "phone": "+34600000000",
                      "email": "myrestaurant@example.com",
                      "logo": "http://mycdn.com/selling-point-logo.jpeg",
                      "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                      "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
                      "mainImageLarge": "https://example.com/selling-point-main-image-large.png",
                      "listImageLarge": "https://example.com/selling-point-list-image-large.png",
                      "urlKey": "restaurant-name-city",
                      "type": "Italian",
                      "timezone": "Europe/Madrid"
                    },
                    "payments": [
                      {
                        "id": 5922,
                        "amount": 29.9,
                        "paymentMethodName": "Credit card",
                        "prepaid": true,
                        "methodCode": "CREDIT_CARD",
                        "status": {
                          "code": "DONE",
                          "name": "Finalizado",
                          "color": "#5AAC44",
                          "callToAction": null
                        }
                      }
                    ],
                    "orderLines": [
                      {
                        "totalAmount": 29.9,
                        "unitPrice": 14.95,
                        "baseAmount": 27.78,
                        "vatAmount": 2.72,
                        "vatValue": 10,
                        "quantity": 2,
                        "comment": "Order line comment",
                        "label": "Pizza margherita",
                        "type": "PRODUCT",
                        "product": {
                          "id": 1221,
                          "externalId": "external_reference"
                        },
                        "childrenOrderLines": []
                      },
                      {
                        "totalAmount": 0,
                        "unitPrice": 0,
                        "quantity": 1,
                        "comment": "",
                        "label": "Shipping costs",
                        "type": "DELIVERY",
                        "distance": 1.13,
                        "childrenOrderLines": []
                      }
                    ],
                    "deliveryAmount": 1,
                    "deliveryAddress": {
                      "id": 1003,
                      "street": "C/ Example, 23",
                      "details": "Canada building",
                      "city": "City name",
                      "province": "Province name",
                      "postalCode": "12345",
                      "latitude": 41.308166,
                      "longitude": 2.019725,
                      "googlePlaceId": "xxxxxxxxxxxx",
                      "placeName": "C/ Example, 23, City name"
                    },
                    "deliveries": [
                      {
                        "id": 1003,
                        "deliveryAccountName": "DeliveryCompanyName",
                        "deliveryAccountPhone": "600000001",
                        "pickupAddress": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": 41.308166,
                          "longitude": 2.019725,
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "deliveryAddress": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": 41.308166,
                          "longitude": 2.019725,
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "pickupAgreedAt": "2017-02-09T12:00:00+0000",
                        "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
                        "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
                        "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
                        "deliveryInstructions": null,
                        "linearDistance": "1.56",
                        "realDistance": "1.97",
                        "estimatedDeliveryDuration": "15",
                        "forSenderInstructions": null,
                        "trackingUrl": "https://example.com/tracking/example",
                        "status": {
                          "code": "PICKING",
                          "name": "Picking",
                          "color": "blue",
                          "isFinalStatus": false
                        },
                        "destinationContactEmail": "jane@example.com",
                        "destinationContactName": "Jane",
                        "destinationContactPhone": "600000000",
                        "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
                        "driver": {
                          "id": 1003,
                          "email": "john@example.com",
                          "name": "John",
                          "lastname": "Doe",
                          "image": "https://example.com/assets/images/placeholder_image.jpg",
                          "phone": "+34600000000",
                          "transport": {
                            "code": "SCOOTER",
                            "name": "Scooter"
                          },
                          "lastGeolocation": {
                            "latitude": 41.308166,
                            "longitude": 2.019725,
                            "createdAt": "2018-03-015T12:15:00+0000"
                          }
                        },
                        "isSelfDelivery": false
                      }
                    ],
                    "dinersNumber": 1,
                    "isCancellable": true,
                    "createdAt": "2017-10-11T12:30:00+0000",
                    "preparationTime": "2017-10-11T13:00:00+0000",
                    "isAsap": false,
                    "market": {
                      "name": "My Restaurant",
                      "darkLogo": "http://mycdn.com/darkLogo.jpeg",
                      "lightLogo": "http://mycdn.com/lightLogo.jpeg",
                      "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
                      "squareLogo": "http://mycdn.com/squareLogo.jpeg"
                    },
                    "currency": {
                      "isoCode": "EUR",
                      "symbol": "€"
                    },
                    "posOrderId": "XXXX-XXXX-XXXX",
                    "marketOrderId": "ZZZZ-ZZZZ-ZZZZ",
                    "marketOrderCode": "XYZ"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/user/orders/active": {
      "get": {
        "summary": "Get active orders for the authenticated user",
        "description": "Returns active orders from every selling point accessible to the authenticated user.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema20757"
                },
                "example": [
                  {
                    "id": 403,
                    "orderGroupId": null,
                    "serviceFeeAmount": 0,
                    "totalAmount": 9,
                    "executionTimeLabel": "no date",
                    "preparationTimeLabel": "no date",
                    "comment": null,
                    "cancellationComment": null,
                    "consumer": null,
                    "status": {
                      "code": null,
                      "name": null,
                      "color": null,
                      "isFinalStatus": false,
                      "globalStatusCode": null
                    },
                    "type": "inside",
                    "sellingPoint": null,
                    "brand": null,
                    "payments": [],
                    "orderLines": [],
                    "isCancellable": false,
                    "isAcceptable": false,
                    "baseAmount": 0,
                    "vatAmount": 0,
                    "test": false,
                    "currency": {
                      "isoCode": null,
                      "symbol": null,
                      "displayPattern": null,
                      "minorUnit": 0
                    },
                    "moduleCode": null,
                    "moduleName": null,
                    "market": null,
                    "createdAt": "2026-08-26T10:00:00+0000",
                    "preparationTime": null,
                    "requestedPreparationTime": null,
                    "isAsap": false,
                    "posOrderId": null,
                    "marketOrderId": null,
                    "marketOrderCode": null,
                    "invoiceNumber": null,
                    "executionTime": null,
                    "dinersNumber": null
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid user access token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Orders (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/orders/active": {
      "get": {
        "summary": "Get active orders",
        "description": "Get selling point non-finished and non-cancelled orders.<br>Please, do not consume this service under a polling strategy (calling every X seconds or minutes), check the NOTIFICATIONS REFERENCE and you will see options to be notified when there is a new order or a new order status",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Selling point identifier",
              "example": 1108
            },
            "description": "Selling point identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema20757"
                },
                "example": [
                  {
                    "id": 4912,
                    "totalAmount": 29.9,
                    "baseAmount": 27.18,
                    "vatAmount": 2.72,
                    "executionTimeLabel": "11/10 at 13:10h",
                    "executionTime": "2017-10-11T13:10:00+0000",
                    "comment": "Thank you",
                    "cancellationComment": null,
                    "consumer": {
                      "id": 1003,
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://example.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "posClientId": "CCCC-CCCC-CCCC",
                      "marketClientId": "MMMM-MMMM-MMMM",
                      "notificationsChannel": "549d70d0e0851200d11229c16f8d38a8b"
                    },
                    "status": {
                      "code": "waiting_sp_validation",
                      "name": "Waiting selling point validation",
                      "color": "#f7981d",
                      "isFinalStatus": false,
                      "globalStatusCode": "processing"
                    },
                    "type": "delivery",
                    "sellingPoint": {
                      "id": 3442,
                      "name": "My restaurant",
                      "address": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": 41.308166,
                        "longitude": 2.019725,
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "phone": "+34600000000",
                      "email": "myrestaurant@example.com",
                      "logo": "http://mycdn.com/selling-point-logo.jpeg",
                      "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                      "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
                      "mainImageLarge": "https://example.com/selling-point-main-image-large.png",
                      "listImageLarge": "https://example.com/selling-point-list-image-large.png",
                      "urlKey": "restaurant-name-city",
                      "type": "Italian",
                      "timezone": "Europe/Madrid"
                    },
                    "payments": [
                      {
                        "id": 5922,
                        "amount": 29.9,
                        "paymentMethodName": "Credit card",
                        "prepaid": true,
                        "methodCode": "CREDIT_CARD",
                        "status": {
                          "code": "DONE",
                          "name": "Finalizado",
                          "color": "#5AAC44",
                          "callToAction": null
                        }
                      }
                    ],
                    "orderLines": [
                      {
                        "totalAmount": 29.9,
                        "unitPrice": 14.95,
                        "baseAmount": 27.78,
                        "vatAmount": 2.72,
                        "vatValue": 10,
                        "quantity": 2,
                        "comment": "Order line comment",
                        "label": "Pizza margherita",
                        "type": "PRODUCT",
                        "product": {
                          "id": 1221,
                          "externalId": "external_reference"
                        },
                        "childrenOrderLines": []
                      },
                      {
                        "totalAmount": 0,
                        "unitPrice": 0,
                        "quantity": 1,
                        "comment": "",
                        "label": "Shipping costs",
                        "type": "DELIVERY",
                        "distance": 1.13,
                        "childrenOrderLines": []
                      }
                    ],
                    "deliveryAmount": 1,
                    "deliveryAddress": {
                      "id": 1003,
                      "street": "C/ Example, 23",
                      "details": "Canada building",
                      "city": "City name",
                      "province": "Province name",
                      "postalCode": "12345",
                      "latitude": 41.308166,
                      "longitude": 2.019725,
                      "googlePlaceId": "xxxxxxxxxxxx",
                      "placeName": "C/ Example, 23, City name"
                    },
                    "deliveries": [
                      {
                        "id": 1003,
                        "deliveryAccountName": "DeliveryCompanyName",
                        "deliveryAccountPhone": "600000001",
                        "pickupAddress": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": 41.308166,
                          "longitude": 2.019725,
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "deliveryAddress": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": 41.308166,
                          "longitude": 2.019725,
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "pickupAgreedAt": "2017-02-09T12:00:00+0000",
                        "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
                        "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
                        "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
                        "deliveryInstructions": null,
                        "linearDistance": "1.56",
                        "realDistance": "1.97",
                        "estimatedDeliveryDuration": "15",
                        "forSenderInstructions": null,
                        "trackingUrl": "https://example.com/tracking/example",
                        "status": {
                          "code": "PICKING",
                          "name": "Picking",
                          "color": "blue",
                          "isFinalStatus": false
                        },
                        "destinationContactEmail": "jane@example.com",
                        "destinationContactName": "Jane",
                        "destinationContactPhone": "600000000",
                        "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
                        "driver": {
                          "id": 1003,
                          "email": "john@example.com",
                          "name": "John",
                          "lastname": "Doe",
                          "image": "https://example.com/assets/images/placeholder_image.jpg",
                          "phone": "+34600000000",
                          "transport": {
                            "code": "SCOOTER",
                            "name": "Scooter"
                          },
                          "lastGeolocation": {
                            "latitude": 41.308166,
                            "longitude": 2.019725,
                            "createdAt": "2018-03-015T12:15:00+0000"
                          }
                        },
                        "isSelfDelivery": false
                      }
                    ],
                    "dinersNumber": 1,
                    "isCancellable": true,
                    "createdAt": "2017-10-11T12:30:00+0000",
                    "preparationTime": "2017-10-11T13:00:00+0000",
                    "isAsap": false,
                    "market": {
                      "name": "My Restaurant",
                      "darkLogo": "http://mycdn.com/darkLogo.jpeg",
                      "lightLogo": "http://mycdn.com/lightLogo.jpeg",
                      "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
                      "squareLogo": "http://mycdn.com/squareLogo.jpeg"
                    },
                    "currency": {
                      "isoCode": "EUR",
                      "symbol": "€"
                    },
                    "posOrderId": "XXXX-XXXX-XXXX",
                    "marketOrderId": "ZZZZ-ZZZZ-ZZZZ",
                    "marketOrderCode": "XYZ"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders (Legacy POS)"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/data-sync/external/upload/tickets": {
      "post": {
        "summary": "Create ticket",
        "description": "Create an operational ticket/incident linked to a selling point.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "restaurantId": {
                    "type": "string",
                    "description": "Selling point / restaurant identifier"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TicketInput"
                    }
                  },
                  "source": {
                    "type": "string",
                    "description": "Optional source label"
                  }
                },
                "required": [
                  "restaurantId",
                  "items"
                ]
              },
              "example": {
                "restaurantId": "1234",
                "source": "external_api",
                "items": [
                  {
                    "externalId": "TCK-001",
                    "title": "Kitchen printer offline",
                    "description": "The kitchen printer is not responding.",
                    "priority": "high",
                    "category": "hardware",
                    "status": "open",
                    "rawPayload": {
                      "original": "..."
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Tickets"
        ]
      }
    },
    "/data-sync/external/upload/categories": {
      "post": {
        "summary": "Create category",
        "description": "Create a product category.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "restaurantId": {
                    "type": "string",
                    "description": "Selling point / restaurant identifier"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/CategoryInput"
                    }
                  }
                },
                "required": [
                  "restaurantId",
                  "items"
                ]
              },
              "example": {
                "restaurantId": "1234",
                "items": [
                  {
                    "externalId": "CAT-PIZZAS",
                    "name": "Pizzas",
                    "description": "Pizza menu section",
                    "position": 1,
                    "parentExternalId": null,
                    "rawPayload": {
                      "original": "..."
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Category"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Categories"
        ]
      }
    },
    "/data-sync/external/upload/zones": {
      "post": {
        "summary": "Create zone",
        "description": "Create a zone/area for a selling point.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "restaurantId": {
                    "type": "string",
                    "description": "Selling point / restaurant identifier"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ZoneInput"
                    }
                  }
                },
                "required": [
                  "restaurantId",
                  "items"
                ]
              },
              "example": {
                "restaurantId": "1234",
                "items": [
                  {
                    "externalId": "ZONE-INSIDE",
                    "name": "Inside",
                    "sellingPointId": 1234,
                    "position": 1,
                    "rawPayload": {
                      "original": "..."
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Zones"
        ]
      }
    },
    "/data-sync/external/upload/tables": {
      "post": {
        "summary": "Create table",
        "description": "Create a table within a zone for a selling point.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "restaurantId": {
                    "type": "string",
                    "description": "Selling point / restaurant identifier"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TableInput"
                    }
                  }
                },
                "required": [
                  "restaurantId",
                  "items"
                ]
              },
              "example": {
                "restaurantId": "1234",
                "items": [
                  {
                    "externalId": "TABLE-12",
                    "name": "Table 12",
                    "zoneExternalId": "ZONE-INSIDE",
                    "seats": 4,
                    "position": 12,
                    "rawPayload": {
                      "original": "..."
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Table"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Tables"
        ]
      }
    },
    "/data-sync/external/data/tickets/{restaurantId}": {
      "get": {
        "summary": "List tickets",
        "description": "List ticket summaries for a restaurant.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "parameters": [
          {
            "name": "restaurantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "375"
            },
            "description": "Restaurant identifier"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by business date (YYYY-MM-DD)"
            }
          },
          {
            "name": "ticketId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Filter by ticket identifier"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            },
            "description": "Max number of items (capped at 1000)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "ticket-1",
                    "externalId": "TCK-001",
                    "title": "Kitchen printer offline",
                    "status": "open"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Tickets"
        ]
      }
    },
    "/data-sync/external/data/categories/{restaurantId}": {
      "get": {
        "summary": "List categories",
        "description": "List product categories for a restaurant.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "parameters": [
          {
            "name": "restaurantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "375"
            },
            "description": "Restaurant identifier"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "category-1",
                    "externalId": "CAT-PIZZAS",
                    "name": "Pizzas",
                    "position": 1
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Categories"
        ]
      }
    },
    "/data-sync/external/data/zones/{restaurantId}": {
      "get": {
        "summary": "List zones",
        "description": "List zones for a restaurant.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "parameters": [
          {
            "name": "restaurantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "375"
            },
            "description": "Restaurant identifier"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "zone-1",
                    "externalId": "ZONE-INSIDE",
                    "name": "Inside",
                    "position": 1
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Zones"
        ]
      }
    },
    "/data-sync/external/data/tables/{restaurantId}": {
      "get": {
        "summary": "List tables",
        "description": "List tables for a restaurant.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "parameters": [
          {
            "name": "restaurantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "375"
            },
            "description": "Restaurant identifier"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional zone filter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": "table-1",
                    "externalId": "TABLE-12",
                    "name": "Table 12",
                    "zoneExternalId": "ZONE-INSIDE",
                    "seats": 4
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - Tables"
        ]
      }
    },
    "/data-sync/external/upload/pos-references": {
      "post": {
        "summary": "Create or update POS references",
        "description": "Sync POS references (products, variants, modifiers, menus, etc.) into OpenQloud.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "restaurantId": {
                    "type": "string",
                    "description": "Selling point / restaurant identifier"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PosReferenceInput"
                    }
                  }
                },
                "required": [
                  "restaurantId",
                  "items"
                ]
              },
              "example": {
                "restaurantId": "1234",
                "items": [
                  {
                    "referenceKey": "PROD-123",
                    "referenceType": "product",
                    "name": "Margherita Pizza",
                    "parentReferenceKey": null,
                    "price": 8.5,
                    "currency": "EUR",
                    "isAvailable": true,
                    "rawPayload": {
                      "original": "..."
                    },
                    "translations": {
                      "es": {
                        "name": "Translated name"
                      }
                    }
                  },
                  {
                    "referenceKey": "PROD-123#OPT-EXTRA-CHEESE",
                    "referenceType": "productOption",
                    "name": "Extra cheese",
                    "parentReferenceKey": "PROD-123",
                    "price": 1.5,
                    "currency": "EUR",
                    "rawPayload": {
                      "original": "..."
                    },
                    "translations": {
                      "es": {
                        "name": "Translated name"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosReference"
                },
                "example": {
                  "ingested": 2
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - POS References"
        ]
      }
    },
    "/data-sync/external/data/pos-references/{restaurantId}": {
      "get": {
        "summary": "List POS references",
        "description": "Read POS references synced for a restaurant.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your POS (not only the online menu subset).",
        "parameters": [
          {
            "name": "restaurantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "375"
            },
            "description": "Restaurant identifier"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by referenceType"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PosReference"
                  }
                },
                "example": [
                  {
                    "id": 1001,
                    "referenceKey": "PROD-123",
                    "referenceType": "product",
                    "name": "Margherita Pizza",
                    "price": 8.5,
                    "currency": "EUR",
                    "vatPercent": 10,
                    "isAvailable": true,
                    "rawPayload": {
                      "source": "example-pos"
                    },
                    "translations": {
                      "en": {
                        "name": "Margherita Pizza"
                      }
                    },
                    "updatedAt": "2026-08-28T20:00:00.000Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Data Sync - POS References"
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/exceptions/next": {
      "get": {
        "operationId": "getSellingPointNextExceptions",
        "summary": "List the next selling point exceptions",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Upcoming exceptions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Selling point exceptions"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/exceptions": {
      "post": {
        "operationId": "createSellingPointException",
        "summary": "Create a selling point exception",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created exception",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "tags": [
          "Selling point exceptions"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/exceptions/{exceptionalStatusId}": {
      "delete": {
        "operationId": "deleteSellingPointException",
        "summary": "Delete a selling point exception",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "exceptionalStatusId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted exception",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Exception not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Selling point exceptions"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/items/availability": {
      "patch": {
        "operationId": "patchLegacyItemsAvailability",
        "summary": "Update legacy item availability",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Availability updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "tags": [
          "Items availability"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/products/{productId}/available": {
      "patch": {
        "operationId": "patchProductAvailability",
        "summary": "Update product availability",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Availability updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Product not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Items availability"
        ],
        "security": [
          {
            "ServerAccessToken": [],
            "UserAccessToken": []
          }
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/serviceLocations": {
      "get": {
        "operationId": "getServiceLocations",
        "summary": "List service locations",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service locations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/serviceLocations/live": {
      "get": {
        "operationId": "getServiceLocationsLive",
        "summary": "List live service locations",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live service locations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/serviceLocations/{serviceLocationId}": {
      "get": {
        "operationId": "getServiceLocation",
        "summary": "Get a service location",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "serviceLocationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service location not found"
          }
        }
      },
      "patch": {
        "operationId": "updateServiceLocation",
        "summary": "Update a service location",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "serviceLocationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated service location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service location not found"
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/serviceLocations/{serviceLocationId}/live": {
      "get": {
        "operationId": "getServiceLocationLive",
        "summary": "Get live service location data",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "serviceLocationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live service location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service location not found"
          }
        }
      },
      "patch": {
        "operationId": "updateServiceLocationLive",
        "summary": "Update live service location data",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "serviceLocationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated live service location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service location not found"
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/serviceLocations/{serviceLocationId}/reset": {
      "patch": {
        "operationId": "resetServiceLocation",
        "summary": "Reset a service location",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "serviceLocationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reset service location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service location not found"
          }
        }
      }
    },
    "/sellingPoints/{sellingPointId}/serviceLocations/{serviceLocationExternalId}/close": {
      "patch": {
        "operationId": "closeServiceLocation",
        "summary": "Close a service location",
        "tags": [
          "Service locations"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "serviceLocationExternalId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Closed service location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Service location not found"
          }
        }
      }
    },
    "/orders": {
      "get": {
        "operationId": "getOrders",
        "summary": "List orders visible to the current user",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sellingPointId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "startDate",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Selling point is required"
          }
        }
      }
    },
    "/user/orders": {
      "get": {
        "operationId": "getUserOrders",
        "summary": "List orders for the current user",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "startDate",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Start date is required"
          }
        }
      }
    },
    "/orders/{orderId}/status": {
      "post": {
        "operationId": "updateOrderStatus",
        "summary": "Update order status",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "orderId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orderStatusTypeCode": {
                    "type": "string"
                  },
                  "statusCode": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Order not found"
          }
        }
      }
    },
    "/orders/{orderId}/dispatch/{dispatchActionCode}": {
      "post": {
        "operationId": "dispatchOrder",
        "summary": "Execute a dispatch action",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "orderId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "dispatchActionCode",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Order not found"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ServerAccessToken": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-server-access-token",
        "description": "Server access token issued from the developer panel."
      },
      "UserAccessToken": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-user-access-token",
        "description": "Integration connection access token issued from the developer console for a module setup. Restaurant login sessions do not authorize the OpenQloud machine API."
      }
    },
    "schemas": {
      "DispatchOrder": {
        "type": "object",
        "description": "Dispatch projection, distinct from the ordinary order representation. Identifiers and decimal amounts are strings.",
        "additionalProperties": false,
        "required": [
          "id",
          "orderTypeCode",
          "marketOrderCode",
          "deliveryPickupCode",
          "totalAmount",
          "consumerName",
          "sellingPointId",
          "sellingPointName",
          "deliveryCompanyName",
          "driverName",
          "brandName",
          "brandIcon",
          "marketName",
          "marketCode",
          "marketIcon",
          "createdAt",
          "acceptedAt",
          "preparedAt",
          "collectedAt",
          "arrivedToPickupLocationAt",
          "deliveredAt",
          "preparationTime",
          "executionTime"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "orderTypeCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketOrderCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "deliveryPickupCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalAmount": {
            "type": [
              "string",
              "null"
            ]
          },
          "consumerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "sellingPointId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sellingPointName": {
            "type": [
              "string",
              "null"
            ]
          },
          "deliveryCompanyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "driverName": {
            "type": [
              "string",
              "null"
            ]
          },
          "brandName": {
            "type": [
              "string",
              "null"
            ]
          },
          "brandIcon": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketName": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketIcon": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "acceptedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "preparedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "collectedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "arrivedToPickupLocationAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "deliveredAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "preparationTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionTime": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LegacyImageFile": {
        "type": "object",
        "nullable": true,
        "required": [
          "id",
          "title",
          "location"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "format": "uri",
            "nullable": true
          }
        }
      },
      "MenuCollectionRawInputData": {
        "type": "object",
        "description": "",
        "example": {
          "autoSelection": true,
          "menus": [
            {
              "name": "Our menu",
              "type": "menu",
              "externalId": "XXX",
              "public": true,
              "allowedOrderTypes": [
                "delivery",
                "collection",
                "insitu",
                "inside"
              ],
              "schedule": {
                "name": "Our menu schedule",
                "scheduleRanges": [
                  {
                    "startDay": 1,
                    "endDay": 1,
                    "startTime": "07:00",
                    "endTime": "10:30"
                  },
                  {
                    "startDay": 2,
                    "endDay": 2,
                    "startTime": "07:00",
                    "endTime": "10:30"
                  },
                  {
                    "startDay": 3,
                    "endDay": 3,
                    "startTime": "07:00",
                    "endTime": "10:30"
                  },
                  {
                    "startDay": 4,
                    "endDay": 4,
                    "startTime": "07:00",
                    "endTime": "10:30"
                  },
                  {
                    "startDay": 5,
                    "endDay": 5,
                    "startTime": "07:00",
                    "endTime": "10:30"
                  },
                  {
                    "startDay": 6,
                    "endDay": 6,
                    "startTime": "10:00",
                    "endTime": "16:30"
                  },
                  {
                    "startDay": 6,
                    "endDay": 6,
                    "startTime": "20:00",
                    "endTime": "23:59"
                  },
                  {
                    "startDay": 7,
                    "endDay": 7,
                    "startTime": "13:00",
                    "endTime": "23:59"
                  }
                ]
              },
              "menuSections": [
                {
                  "externalId": "12-345",
                  "name": "Maldito Tacos",
                  "image": "https://example.com/9583836866_9583837391_13601746437668bebidas.png",
                  "position": 11,
                  "products": [
                    {
                      "name": "MEADLE EAST GREEN",
                      "externalId": "101-113-6-5",
                      "price": {
                        "amount": 10,
                        "amountA": null,
                        "amountB": null,
                        "amountC": null,
                        "amountD": null,
                        "vatValue": 10
                      },
                      "public": true,
                      "featured": false,
                      "isAvailable": true,
                      "addProductOptionsToVariants": false,
                      "productVariants": [],
                      "tags": [],
                      "allergens": [
                        "gluten",
                        "dairy"
                      ],
                      "image": "https://xxxxx.com/sfsdf.png",
                      "productOptionsCategories": [
                        {
                          "externalId": null,
                          "name": "Extras",
                          "minSelection": 0,
                          "maxSelection": 100,
                          "maxSameOptionSelection": 100,
                          "productOptions": [
                            {
                              "externalId": "102-114--",
                              "name": "EXTRA PAN",
                              "price": {
                                "amount": 1,
                                "amountA": null,
                                "amountB": null,
                                "amountC": null,
                                "amountD": null,
                                "vatValue": 10
                              },
                              "translations": {
                                "es": {
                                  "name": "Translated name"
                                }
                              }
                            },
                            {
                              "externalId": "103-115--",
                              "name": "EXTRA QUESO AZUL",
                              "price": {
                                "amount": 1,
                                "amountA": null,
                                "amountB": null,
                                "amountC": null,
                                "amountD": null,
                                "vatValue": 10
                              },
                              "translations": {
                                "es": {
                                  "name": "Translated name"
                                }
                              }
                            },
                            {
                              "externalId": "104-116--",
                              "name": "EXTRA QUESO FETA",
                              "price": {
                                "amount": 1,
                                "amountA": null,
                                "amountB": null,
                                "amountC": null,
                                "amountD": null,
                                "vatValue": 10
                              },
                              "translations": {
                                "es": {
                                  "name": "Translated name"
                                }
                              }
                            },
                            {
                              "externalId": "105-117--",
                              "name": "EXTRA TOSTADAS CEREALES",
                              "price": {
                                "amount": 1,
                                "amountA": null,
                                "amountB": null,
                                "amountC": null,
                                "amountD": null,
                                "vatValue": 10
                              },
                              "translations": {
                                "es": {
                                  "name": "Translated name"
                                }
                              }
                            },
                            {
                              "externalId": "106-118--",
                              "name": "EXTRA TOTOPOS",
                              "price": {
                                "amount": 1,
                                "amountA": null,
                                "amountB": null,
                                "amountC": null,
                                "amountD": null,
                                "vatValue": 10
                              },
                              "translations": {
                                "es": {
                                  "name": "Translated name"
                                }
                              }
                            },
                            {
                              "externalId": "107-119--",
                              "name": "EXTRA PESTO WHEATGRASS",
                              "price": {
                                "amount": 1,
                                "amountA": null,
                                "amountB": null,
                                "amountC": null,
                                "amountD": null,
                                "vatValue": 10
                              },
                              "translations": {
                                "es": {
                                  "name": "Translated name"
                                }
                              }
                            }
                          ],
                          "translations": {
                            "es": {
                              "name": "Translated name"
                            }
                          }
                        }
                      ],
                      "translations": {
                        "es": {
                          "name": "Translated name"
                        }
                      }
                    }
                  ],
                  "translations": {
                    "es": {
                      "name": "Translated name"
                    }
                  }
                }
              ],
              "translations": {
                "es": {
                  "name": "Translated name"
                }
              }
            }
          ]
        },
        "properties": {
          "autoSelection": {
            "type": "boolean",
            "description": "When true, creates a fresh menu selection containing every product assigned to each section.",
            "example": true
          },
          "sendAllMenusToChannels": {
            "type": "boolean",
            "description": "When true, delivers the complete committed catalog to each active sales channel webhook after returning the HTTP response. Payload format follows the destination module configuration: `module.new_webhook_system = false` emits the byte-compatible legacy OpenQloud payload; `true` emits the enriched payload with translations, allergens and per-order-type prices. Delivery results are tracked independently per channel. When false, no channel notification is generated.",
            "default": false
          },
          "preserveProductPresentation": {
            "type": "boolean",
            "description": "When true, existing OpenQloud-managed product and option names, descriptions and images are preserved. Prices, availability, allergens, translations and relationships are still processed.",
            "default": false
          },
          "menus": {
            "type": "array",
            "description": "Complete desired menu collection. Omitted catalog entities are removed or disabled.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Our menu"
                },
                "type": {
                  "type": "string",
                  "example": "menu"
                },
                "externalId": {
                  "type": "string",
                  "example": "XXX"
                },
                "public": {
                  "type": "boolean",
                  "example": true
                },
                "allowedOrderTypes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "example": "delivery"
                  }
                },
                "scheduleId": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Identifier of an existing selling-point schedule. The bulk GET returns this field so its response can be replayed directly through PATCH. On writes, use either scheduleId or the inline schedule object.",
                  "example": 123
                },
                "schedule": {
                  "type": "object",
                  "description": "Inline schedule definition used when creating or replacing a schedule. This is an alternative to scheduleId.",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Our menu schedule"
                    },
                    "scheduleRanges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "startDay": {
                            "type": "integer",
                            "example": 1
                          },
                          "endDay": {
                            "type": "integer",
                            "example": 1
                          },
                          "startTime": {
                            "type": "string",
                            "example": "07:00"
                          },
                          "endTime": {
                            "type": "string",
                            "example": "10:30"
                          }
                        }
                      }
                    }
                  }
                },
                "menuSections": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "example": "12-345"
                      },
                      "name": {
                        "type": "string",
                        "example": "Maldito Tacos"
                      },
                      "image": {
                        "type": "string",
                        "format": "uri",
                        "description": "Publicly reachable HTTP or HTTPS image URL for the menu section.",
                        "example": "https://example.com/9583836866_9583837391_13601746437668bebidas.png"
                      },
                      "position": {
                        "type": "integer",
                        "example": 11
                      },
                      "products": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": "MEADLE EAST GREEN"
                            },
                            "externalId": {
                              "type": "string",
                              "example": "101-113-6-5"
                            },
                            "price": {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "integer",
                                  "example": 10
                                },
                                "amountA": {
                                  "type": "string",
                                  "example": null
                                },
                                "amountB": {
                                  "type": "string",
                                  "example": null
                                },
                                "amountC": {
                                  "type": "string",
                                  "example": null
                                },
                                "amountD": {
                                  "type": "string",
                                  "example": null
                                },
                                "vatValue": {
                                  "type": "integer",
                                  "example": 10
                                }
                              }
                            },
                            "public": {
                              "type": "boolean",
                              "example": true
                            },
                            "featured": {
                              "type": "boolean",
                              "example": false
                            },
                            "isAvailable": {
                              "type": "boolean",
                              "example": true
                            },
                            "addProductOptionsToVariants": {
                              "type": "boolean",
                              "example": false
                            },
                            "productVariants": {
                              "type": "array",
                              "description": "Variants use the same product fields, including independent allergens and translations.",
                              "items": {
                                "$ref": "#/components/schemas/ProductInputData"
                              }
                            },
                            "allergens": {
                              "type": "array",
                              "description": "Canonical allergen codes. Omit to preserve existing assignments, send an empty array to clear them, or send a non-empty array to replace them. Unknown codes are rejected before persistence. Current values: https://api.openqloud.com/public-data/v1/allergens.",
                              "uniqueItems": true,
                              "x-canonical-values-url": "https://api.openqloud.com/public-data/v1/allergens",
                              "items": {
                                "type": "string",
                                "example": "gluten"
                              }
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "image": {
                              "type": "string",
                              "format": "uri",
                              "description": "Publicly reachable HTTP or HTTPS product image URL.",
                              "example": "https://xxxxx.com/sfsdf.png"
                            },
                            "productOptionsCategories": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "externalId": {
                                    "type": "string",
                                    "example": null
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Extras"
                                  },
                                  "minSelection": {
                                    "type": "integer",
                                    "example": 0
                                  },
                                  "maxSelection": {
                                    "type": "integer",
                                    "example": 100
                                  },
                                  "maxSameOptionSelection": {
                                    "type": "integer",
                                    "example": 100
                                  },
                                  "productOptions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "externalId": {
                                          "type": "string",
                                          "example": "102-114--"
                                        },
                                        "name": {
                                          "type": "string",
                                          "example": "EXTRA PAN"
                                        },
                                        "price": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "integer",
                                              "example": 1
                                            },
                                            "amountA": {
                                              "type": "string",
                                              "example": null
                                            },
                                            "amountB": {
                                              "type": "string",
                                              "example": null
                                            },
                                            "amountC": {
                                              "type": "string",
                                              "example": null
                                            },
                                            "amountD": {
                                              "type": "string",
                                              "example": null
                                            },
                                            "vatValue": {
                                              "type": "integer",
                                              "example": 10
                                            }
                                          }
                                        },
                                        "translations": {
                                          "type": "object",
                                          "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                                          "additionalProperties": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "example": "Translated name"
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "translations": {
                                    "type": "object",
                                    "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                                    "additionalProperties": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "example": "Translated name"
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "translations": {
                              "type": "object",
                              "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                              "additionalProperties": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "example": "Translated name"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "translations": {
                        "type": "object",
                        "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": "Translated name"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "translations": {
                  "type": "object",
                  "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "Translated name"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Error",
        "example": {
          "code": "ERROR_CODE_EXAMPLE",
          "message": "Error message"
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code identifier",
            "example": "string"
          },
          "message": {
            "type": "string",
            "description": "Error description",
            "example": "string"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "errors": {
        "type": "array",
        "description": "Errors",
        "example": [
          {
            "code": "ERROR_CODE_EXAMPLE",
            "message": "Error message"
          }
        ],
        "items": {
          "$ref": "#/components/schemas/Error"
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Error response",
        "example": {
          "errors": [
            {
              "code": "ERROR_CODE_EXAMPLE",
              "message": "Error message"
            }
          ],
          "code": "ERROR_CODE_EXAMPLE",
          "message": "Error message",
          "httpResponseCode": "400"
        },
        "properties": {
          "errors": {
            "$ref": "#/components/schemas/errors"
          },
          "code": {
            "type": "string",
            "description": "Error code identifier",
            "example": "string"
          },
          "message": {
            "type": "string",
            "description": "Error description",
            "example": "string"
          },
          "httpResponseCode": {
            "type": "string",
            "description": "HTTP response code",
            "example": "string"
          }
        },
        "required": [
          "code",
          "message",
          "httpResponseCode"
        ]
      },
      "PosMenuCollectionRaw": {
        "type": "object",
        "description": "Legacy-compatible result envelope returned after replacing the complete menu collection.",
        "required": [
          "success",
          "httpResponseCode",
          "message",
          "errors",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "httpResponseCode": {
            "type": "integer",
            "example": 200
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string",
            "example": "OK"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "PatchServiceZonesData": {
        "type": "object",
        "description": "Service zones data",
        "example": [
          {
            "code": "BAR",
            "externalId": 1,
            "name": "Barra",
            "serviceLocations": [
              {
                "code": "B1",
                "externalId": "B1",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B1",
                "securityCode": null
              },
              {
                "code": "B2",
                "externalId": "B2",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B2",
                "securityCode": null
              },
              {
                "code": "B3",
                "externalId": "B3",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B3",
                "securityCode": null
              },
              {
                "code": "B4",
                "externalId": "B4",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B4",
                "securityCode": null
              },
              {
                "code": "B5",
                "externalId": "B5",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B5",
                "securityCode": null
              },
              {
                "code": "B6",
                "externalId": "B6",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B6",
                "securityCode": null
              },
              {
                "code": "B7",
                "externalId": "B7",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B7",
                "securityCode": null
              },
              {
                "code": "B8",
                "externalId": "B8",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B8",
                "securityCode": null
              },
              {
                "code": "B9",
                "externalId": "B9",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B9",
                "securityCode": null
              },
              {
                "code": "B10",
                "externalId": "B10",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "B10",
                "securityCode": null
              }
            ]
          },
          {
            "code": "TER",
            "externalId": 2,
            "name": "Terraza",
            "serviceLocations": [
              {
                "code": "T1",
                "externalId": "T1",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T1",
                "securityCode": null
              },
              {
                "code": "T2",
                "externalId": "T2",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T2",
                "securityCode": null
              },
              {
                "code": "T3",
                "externalId": "T3",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T3",
                "securityCode": null
              },
              {
                "code": "T4",
                "externalId": "T4",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T4",
                "securityCode": null
              },
              {
                "code": "T5",
                "externalId": "T5",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T5",
                "securityCode": null
              },
              {
                "code": "T6",
                "externalId": "T6",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T6",
                "securityCode": null
              },
              {
                "code": "T7",
                "externalId": "T7",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T7",
                "securityCode": null
              },
              {
                "code": "T8",
                "externalId": "T8",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "T8",
                "securityCode": null
              }
            ]
          },
          {
            "code": "SAL",
            "externalId": 3,
            "name": "Salón",
            "serviceLocations": [
              {
                "code": "S1",
                "externalId": "S1",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S1",
                "securityCode": null
              },
              {
                "code": "S2",
                "externalId": "S2",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S2",
                "securityCode": null
              },
              {
                "code": "S3",
                "externalId": "S3",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S3",
                "securityCode": null
              },
              {
                "code": "S4",
                "externalId": "S4",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S4",
                "securityCode": null
              },
              {
                "code": "S5",
                "externalId": "S5",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S5",
                "securityCode": null
              },
              {
                "code": "S6",
                "externalId": "S6",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S6",
                "securityCode": null
              },
              {
                "code": "S7",
                "externalId": "S7",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S7",
                "securityCode": null
              },
              {
                "code": "S8",
                "externalId": "S8",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S8",
                "securityCode": null
              },
              {
                "code": "S9",
                "externalId": "S9",
                "maxDiners": 0,
                "minDiners": 0,
                "name": "S9",
                "securityCode": null
              }
            ]
          }
        ],
        "properties": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "BAR"
              },
              "externalId": {
                "type": "integer",
                "example": 1
              },
              "name": {
                "type": "string",
                "example": "Barra"
              },
              "serviceLocations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "B1"
                    },
                    "externalId": {
                      "type": "string",
                      "example": "B1"
                    },
                    "maxDiners": {
                      "type": "integer",
                      "example": 0
                    },
                    "minDiners": {
                      "type": "integer",
                      "example": 0
                    },
                    "name": {
                      "type": "string",
                      "example": "B1"
                    },
                    "securityCode": {
                      "type": "string",
                      "example": null
                    }
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "TER"
              },
              "externalId": {
                "type": "integer",
                "example": 2
              },
              "name": {
                "type": "string",
                "example": "Terraza"
              },
              "serviceLocations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "T1"
                    },
                    "externalId": {
                      "type": "string",
                      "example": "T1"
                    },
                    "maxDiners": {
                      "type": "integer",
                      "example": 0
                    },
                    "minDiners": {
                      "type": "integer",
                      "example": 0
                    },
                    "name": {
                      "type": "string",
                      "example": "T1"
                    },
                    "securityCode": {
                      "type": "string",
                      "example": null
                    }
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "SAL"
              },
              "externalId": {
                "type": "integer",
                "example": 3
              },
              "name": {
                "type": "string",
                "example": "Salón"
              },
              "serviceLocations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "S1"
                    },
                    "externalId": {
                      "type": "string",
                      "example": "S1"
                    },
                    "maxDiners": {
                      "type": "integer",
                      "example": 0
                    },
                    "minDiners": {
                      "type": "integer",
                      "example": 0
                    },
                    "name": {
                      "type": "string",
                      "example": "S1"
                    },
                    "securityCode": {
                      "type": "string",
                      "example": null
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "PosPartialProduct": {
        "type": "object",
        "description": null,
        "example": {
          "id": 23211,
          "externalId": null,
          "name": "First Product Name",
          "image": null,
          "price": {
            "amount": 6.5,
            "vatValue": 10
          },
          "inMenuPrice": null,
          "public": false,
          "featured": false,
          "translations": {
            "es": {
              "name": "Translated name"
            }
          }
        },
        "properties": {
          "id": {
            "type": "integer",
            "example": 23211
          },
          "externalId": {
            "type": "string",
            "example": null
          },
          "name": {
            "type": "string",
            "example": "First Product Name"
          },
          "image": {
            "type": "string",
            "example": null
          },
          "price": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "example": 6.5
              },
              "vatValue": {
                "type": "number",
                "example": 10
              }
            }
          },
          "inMenuPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceData"
              },
              {
                "type": "null"
              }
            ],
            "example": null
          },
          "public": {
            "type": "boolean",
            "example": false
          },
          "featured": {
            "type": "boolean",
            "example": false
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                }
              }
            }
          }
        }
      },
      "Products": {
        "type": "array",
        "description": "Collection of partial products",
        "example": [
          {
            "id": 23211,
            "externalId": null,
            "name": "First Product Name",
            "image": null,
            "price": {
              "amount": 6.5,
              "vatValue": 10
            },
            "inMenuPrice": null,
            "public": false,
            "featured": false,
            "translations": {
              "es": {
                "name": "Translated name"
              }
            }
          },
          {
            "id": 23519,
            "externalId": null,
            "name": "Second Product Name",
            "image": null,
            "price": {
              "amount": 8.95,
              "vatValue": 10
            },
            "inMenuPrice": null,
            "public": false,
            "featured": false,
            "translations": {
              "es": {
                "name": "Translated name"
              }
            }
          }
        ],
        "items": {
          "$ref": "#/components/schemas/PosPartialProduct"
        }
      },
      "ProductInputData": {
        "type": "object",
        "description": "",
        "example": {
          "name": "Cheese Burger",
          "externalId": "{YOUR POS REFERENCE}",
          "price": {
            "amount": 11.75,
            "amountA": 11.75,
            "amountB": 11.75,
            "amountC": 11.75,
            "amountD": 11.75,
            "vatValue": "10"
          },
          "inMenuPrice": {
            "amount": 3.2,
            "amountA": 3.2,
            "amountB": 3.2,
            "amountC": 3.2,
            "amountD": 3.2,
            "vatValue": "10"
          },
          "shortDescription": "Burger with cheddar",
          "description": "Using our best bread...",
          "image": "https://example.com/image.jpg",
          "public": true,
          "featured": false,
          "isAvailable": true,
          "addProductOptionsToVariants": false,
          "productVariants": [
            {
              "name": "King Size",
              "externalId": "external_reference",
              "shortDescription": "Biggest size",
              "price": {
                "amount": 14.45,
                "amountA": 14.45,
                "amountB": 14.45,
                "amountC": 14.45,
                "amountD": 14.45,
                "vatValue": 10
              },
              "translations": {
                "es": {
                  "name": "Translated name",
                  "shortDescription": "Translated short description"
                }
              }
            }
          ],
          "tags": [
            "Cheddar",
            "Premium"
          ],
          "productOptionsIds": [
            1443,
            2552,
            1123
          ],
          "translations": {
            "es": {
              "name": "Translated name",
              "shortDescription": "Translated short description",
              "description": "Translated description"
            }
          }
        },
        "properties": {
          "name": {
            "type": "string",
            "example": "Cheese Burger"
          },
          "externalId": {
            "type": "string",
            "example": "{YOUR POS REFERENCE}"
          },
          "price": {
            "$ref": "#/components/schemas/LegacyPriceInput"
          },
          "inMenuPrice": {
            "$ref": "#/components/schemas/LegacyPriceInput"
          },
          "shortDescription": {
            "type": "string",
            "example": "Burger with cheddar"
          },
          "description": {
            "type": "string",
            "example": "Using our best bread..."
          },
          "image": {
            "type": "string",
            "format": "uri",
            "description": "Publicly reachable HTTP or HTTPS product image URL.",
            "example": "https://example.com/image.jpg"
          },
          "public": {
            "type": "boolean",
            "example": true
          },
          "featured": {
            "type": "boolean",
            "example": false
          },
          "isAvailable": {
            "type": "boolean",
            "example": true
          },
          "addProductOptionsToVariants": {
            "type": "boolean",
            "example": false
          },
          "productVariants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "King Size"
                },
                "externalId": {
                  "type": "string",
                  "example": "external_reference"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "Biggest size"
                },
                "price": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "example": 14.45
                    },
                    "amountA": {
                      "type": "number",
                      "example": 14.45
                    },
                    "amountB": {
                      "type": "number",
                      "example": 14.45
                    },
                    "amountC": {
                      "type": "number",
                      "example": 14.45
                    },
                    "amountD": {
                      "type": "number",
                      "example": 14.45
                    },
                    "vatValue": {
                      "type": "number",
                      "example": 10
                    }
                  }
                },
                "allergens": {
                  "type": "array",
                  "description": "Canonical allergen codes for this variant. Values come from https://api.openqloud.com/public-data/v1/allergens.",
                  "items": {
                    "type": "string",
                    "example": "dairy"
                  }
                },
                "translations": {
                  "type": "object",
                  "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "Translated name"
                      },
                      "shortDescription": {
                        "type": "string",
                        "example": "Translated short description"
                      }
                    }
                  }
                }
              }
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "Cheddar"
            }
          },
          "allergens": {
            "type": "array",
            "description": "Canonical allergen codes. On PATCH, omit to preserve existing assignments, send an empty array to clear them, or send a non-empty array to replace them. Unknown codes are rejected before persistence. Current values: https://api.openqloud.com/public-data/v1/allergens.",
            "uniqueItems": true,
            "x-canonical-values-url": "https://api.openqloud.com/public-data/v1/allergens",
            "items": {
              "type": "string",
              "example": "gluten"
            }
          },
          "productOptionsIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "example": 1443
            }
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "Translated short description"
                },
                "description": {
                  "type": "string",
                  "example": "Translated description"
                }
              }
            }
          }
        }
      },
      "PosProduct": {
        "type": "object",
        "description": "",
        "example": [],
        "properties": []
      },
      "PriceData": {
        "type": "object",
        "description": "Product option price",
        "example": {
          "amount": 0.75,
          "vatValue": 10
        },
        "properties": {
          "amount": {
            "type": "number",
            "format": "float",
            "description": "Price amount VAT included",
            "example": 0
          },
          "vatValue": {
            "type": "number",
            "format": "float",
            "description": "Vat value",
            "example": 0
          }
        },
        "required": [
          "amount",
          "vatValue"
        ]
      },
      "LegacyPriceInput": {
        "description": "Legacy-compatible price input. Numeric strings and numbers are accepted as shorthand for the VAT-inclusive base amount; the object form also supports VAT and rate-specific amounts.",
        "oneOf": [
          {
            "type": "number",
            "format": "float"
          },
          {
            "type": "string",
            "pattern": "^-?\\d+(?:\\.\\d+)?$",
            "example": "0.70"
          },
          {
            "type": "object",
            "properties": {
              "amount": {
                "oneOf": [
                  {
                    "type": "number",
                    "format": "float"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "amountA": {
                "oneOf": [
                  {
                    "type": "number",
                    "format": "float"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "amountB": {
                "oneOf": [
                  {
                    "type": "number",
                    "format": "float"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "amountC": {
                "oneOf": [
                  {
                    "type": "number",
                    "format": "float"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "amountD": {
                "oneOf": [
                  {
                    "type": "number",
                    "format": "float"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "vatValue": {
                "oneOf": [
                  {
                    "type": "number",
                    "format": "float"
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            }
          }
        ]
      },
      "ProductOption": {
        "type": "object",
        "description": "",
        "example": {
          "id": "233",
          "name": "Cheddar",
          "shortDescription": "Add cheddar to your pizza",
          "position": 1,
          "isAvailable": true,
          "price": {
            "amount": 0.75,
            "vatValue": 10
          },
          "translations": {
            "es": {
              "name": "Translated name",
              "shortDescription": "Translated short description"
            }
          }
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Product option identifier",
            "example": 0
          },
          "externalId": {
            "type": "string",
            "description": "Custom identifier",
            "example": "string"
          },
          "name": {
            "type": "string",
            "description": "Product option name",
            "example": "string"
          },
          "shortDescription": {
            "type": "string",
            "description": "Product option short description",
            "example": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "description": "Product option position",
            "example": 0
          },
          "isAvailable": {
            "type": "boolean",
            "description": "Returns true if the product option can be purchased",
            "example": true
          },
          "price": {
            "$ref": "#/components/schemas/LegacyPriceInput"
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "Translated short description"
                }
              }
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "productOptions": {
        "type": "array",
        "description": "Product options for product option category",
        "example": [
          {
            "id": "233",
            "name": "Cheddar",
            "shortDescription": "Add cheddar to your pizza",
            "position": 1,
            "isAvailable": true,
            "price": {
              "amount": 0.75,
              "vatValue": 10
            },
            "translations": {
              "es": {
                "name": "Translated name",
                "shortDescription": "Translated short description"
              }
            }
          }
        ],
        "items": {
          "$ref": "#/components/schemas/ProductOption"
        }
      },
      "ProductOptionsCategory": {
        "type": "object",
        "description": "",
        "example": {
          "id": "102",
          "name": "Our ingredients",
          "shortDescription": "What do you put on your pizza?",
          "position": 1,
          "maxSelection": 10,
          "minSelection": null,
          "maxSameOptionSelection": 2,
          "selectionLabel": "Max. 10",
          "productOptions": [
            {
              "id": "233",
              "name": "Cheddar",
              "shortDescription": "Add cheddar to your pizza",
              "position": 1,
              "isAvailable": true,
              "price": {
                "amount": 0.75,
                "vatValue": 10
              },
              "translations": {
                "es": {
                  "name": "Translated name",
                  "shortDescription": "Translated short description"
                }
              }
            }
          ],
          "translations": {
            "es": {
              "name": "Translated name",
              "shortDescription": "Translated short description"
            }
          }
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Product option category identifier",
            "example": 0
          },
          "externalId": {
            "type": "string",
            "description": "Custom identifier",
            "example": "string"
          },
          "name": {
            "type": "string",
            "description": "Product option category name",
            "example": "string"
          },
          "shortDescription": {
            "type": "string",
            "description": "Product option category description",
            "example": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "description": "Product option category position",
            "example": 0
          },
          "maxSelection": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum of options selected for product option category",
            "example": 0
          },
          "minSelection": {
            "type": "integer",
            "format": "int32",
            "description": "Required minimum of product options selected by consumer. If this value is NULL the consumer may not select any option in this category",
            "example": 0
          },
          "maxSameOptionSelection": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum times wich the same product option can be selected by consumer. If this value is NULL the consumer can select the same option as many times as he want limited by maxOptions value",
            "example": 0
          },
          "selectionLabel": {
            "type": "string",
            "description": "Text describing minimum and maximum selection options",
            "example": "string"
          },
          "productOptions": {
            "$ref": "#/components/schemas/productOptions"
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "Translated short description"
                }
              }
            }
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ProductOptionCategories": {
        "type": "array",
        "description": null,
        "example": [
          {
            "id": "102",
            "name": "Our ingredients",
            "shortDescription": "What do you put on your pizza?",
            "position": 1,
            "maxSelection": 10,
            "minSelection": null,
            "maxSameOptionSelection": 2,
            "selectionLabel": "Max. 10",
            "productOptions": [
              {
                "id": "233",
                "name": "Cheddar",
                "shortDescription": "Add cheddar to your pizza",
                "position": 1,
                "isAvailable": true,
                "price": {
                  "amount": 0.75,
                  "vatValue": 10
                },
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              }
            ],
            "translations": {
              "es": {
                "name": "Translated name",
                "shortDescription": "Translated short description"
              }
            }
          }
        ],
        "items": {
          "$ref": "#/components/schemas/ProductOptionsCategory"
        }
      },
      "ProductOptionsCategoryInputData": {
        "type": "object",
        "description": "",
        "example": {
          "name": "Extras",
          "externalId": "external_reference",
          "shortDescription": "Using our best bread...",
          "minOptions": 2,
          "maxOptions": 3,
          "maxSameOptionSelection": 2,
          "position": 1,
          "productOptions": [
            {
              "name": "Extra bacon",
              "externalId": "external_reference",
              "shortDescription": "Fried bacon",
              "price": {
                "amount": 1.5,
                "amountA": null,
                "amountB": null,
                "amountC": null,
                "amountD": null,
                "vatValue": 10
              },
              "position": 1,
              "isAvailable": true,
              "translations": {
                "es": {
                  "name": "Translated name",
                  "shortDescription": "Translated short description"
                }
              }
            }
          ],
          "translations": {
            "es": {
              "name": "Translated name",
              "shortDescription": "Translated short description"
            }
          }
        },
        "properties": {
          "name": {
            "type": "string",
            "description": "Product options category name",
            "example": "string"
          },
          "externalId": {
            "type": "string",
            "description": "Custom identifier",
            "example": "string"
          },
          "shortDescription": {
            "type": "string",
            "description": "Product option category short description",
            "example": "string"
          },
          "minOptions": {
            "type": "integer",
            "description": "Required minimum of product options selected by consumer. If this value is NULL the consumer may not select any option in this category.",
            "example": 0
          },
          "maxOptions": {
            "type": "integer",
            "description": "Maximum of product options that can be selected by consumer. If this value is NULL the consumer can select options as many times as he want.",
            "example": 0
          },
          "maxSameOptionSelection": {
            "type": "integer",
            "description": "Maximum times wich the same product option can be selected by consumer. If this value is NULL the consumer can select the same option as many times as he want limited by maxOptions value.",
            "example": 0
          },
          "position": {
            "type": "integer",
            "description": "Product option category position",
            "example": 0
          },
          "productOptions": {
            "$ref": "#/components/schemas/productOptions"
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "Translated short description"
                }
              }
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "ProductOptionsCategoryInputDataPatch": {
        "type": "object",
        "description": "",
        "example": {
          "name": "Extras",
          "externalId": "external_reference",
          "shortDescription": "Using our best bread...",
          "minOptions": 2,
          "maxOptions": 3,
          "maxSameOptionSelection": 2,
          "position": 1,
          "productOptions": [
            {
              "name": "Extra bacon",
              "externalId": "external_reference",
              "shortDescription": "Fried bacon",
              "price": {
                "amount": 1.5,
                "vatValue": 10
              },
              "position": 1,
              "isAvailable": true,
              "id": 6621,
              "translations": {
                "es": {
                  "name": "Translated name",
                  "shortDescription": "Translated short description"
                }
              }
            }
          ],
          "translations": {
            "es": {
              "name": "Translated name",
              "shortDescription": "Translated short description"
            }
          }
        },
        "properties": {
          "name": {
            "type": "string",
            "description": "Product options category name",
            "example": "string"
          },
          "externalId": {
            "type": "string",
            "description": "Custom identifier",
            "example": "string"
          },
          "shortDescription": {
            "type": "string",
            "description": "Product option category short description",
            "example": "string"
          },
          "minOptions": {
            "type": "integer",
            "description": "Required minimum of product options selected by consumer. If this value is NULL the consumer may not select any option in this category.",
            "example": 0
          },
          "maxOptions": {
            "type": "integer",
            "description": "Maximum of product options that can be selected by consumer. If this value is NULL the consumer can select options as many times as he want.",
            "example": 0
          },
          "maxSameOptionSelection": {
            "type": "integer",
            "description": "Maximum times wich the same product option can be selected by consumer. If this value is NULL the consumer can select the same option as many times as he want limited by maxOptions value.",
            "example": 0
          },
          "position": {
            "type": "integer",
            "description": "Product option category position",
            "example": 0
          },
          "productOptions": {
            "$ref": "#/components/schemas/productOptions"
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "Translated short description"
                }
              }
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "MenuCollectionInputData": {
        "type": "object",
        "description": "",
        "example": [
          {
            "name": "Set Menu name",
            "externalId": "ext_m1",
            "type": "setmenu",
            "position": 1,
            "public": true,
            "allowedOrderTypes": [
              "delivery",
              "collection",
              "insitu"
            ],
            "availableFrom": "2019-01-01T00:00:00+0000",
            "availableTo": "2019-07-01T00:00:00+0000",
            "price": {
              "amount": 16.9,
              "vatValue": 10
            },
            "shortDescription": "Set menu description",
            "menuSections": [
              {
                "externalId": "ext_ms_1",
                "name": "First set menu section name",
                "shortDescription": "First set menu section description",
                "position": 1,
                "minSelection": 1,
                "maxSelection": 1,
                "productsIds": [
                  34332,
                  34333,
                  34334,
                  34335
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              },
              {
                "externalId": "ext_ms_1",
                "name": "Second set menu section name",
                "shortDescription": "Second set menu section description",
                "position": 1,
                "minSelection": 1,
                "maxSelection": 1,
                "productsIds": [
                  39371,
                  39372,
                  39373,
                  39374
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              }
            ],
            "scheduleId": null,
            "translations": {
              "es": {
                "name": "Translated name",
                "shortDescription": "Translated short description"
              }
            }
          },
          {
            "name": "Menu name",
            "externalId": "ext_m2",
            "type": "menu",
            "position": 2,
            "public": true,
            "allowedOrderTypes": [
              "delivery",
              "collection",
              "insitu"
            ],
            "shortDescription": "Menu description",
            "menuSections": [
              {
                "externalId": "ext_ms_3",
                "name": "First menu section name",
                "shortDescription": "First menu section description",
                "position": 1,
                "productsIds": [
                  12391,
                  12392,
                  12393,
                  12394
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              },
              {
                "externalId": "ext_ms_4",
                "name": "Second menu section name",
                "shortDescription": "Second menu section description",
                "position": 2,
                "productsIds": [
                  99211,
                  99212,
                  99213,
                  99214
                ],
                "translations": {
                  "es": {
                    "name": "Translated name",
                    "shortDescription": "Translated short description"
                  }
                }
              }
            ],
            "translations": {
              "es": {
                "name": "Translated name",
                "shortDescription": "Translated short description"
              }
            }
          }
        ],
        "properties": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Set Menu name"
              },
              "externalId": {
                "type": "string",
                "example": "ext_m1"
              },
              "type": {
                "type": "string",
                "example": "setmenu"
              },
              "position": {
                "type": "integer",
                "example": 1
              },
              "public": {
                "type": "boolean",
                "example": true
              },
              "allowedOrderTypes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "delivery"
                }
              },
              "availableFrom": {
                "type": "string",
                "example": "2019-01-01T00:00:00+0000"
              },
              "availableTo": {
                "type": "string",
                "example": "2019-07-01T00:00:00+0000"
              },
              "price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "example": 16.9
                  },
                  "vatValue": {
                    "type": "number",
                    "example": 10
                  }
                }
              },
              "shortDescription": {
                "type": "string",
                "example": "Set menu description"
              },
              "menuSections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "externalId": {
                      "type": "string",
                      "example": "ext_ms_1"
                    },
                    "name": {
                      "type": "string",
                      "example": "First set menu section name"
                    },
                    "shortDescription": {
                      "type": "string",
                      "example": "First set menu section description"
                    },
                    "position": {
                      "type": "integer",
                      "example": 1
                    },
                    "minSelection": {
                      "type": "integer",
                      "example": 1
                    },
                    "maxSelection": {
                      "type": "integer",
                      "example": 1
                    },
                    "productsIds": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "example": 34332
                      }
                    },
                    "translations": {
                      "type": "object",
                      "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Translated name"
                          },
                          "shortDescription": {
                            "type": "string",
                            "example": "Translated short description"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "scheduleId": {
                "type": "string",
                "example": null
              },
              "translations": {
                "type": "object",
                "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Translated name"
                    },
                    "shortDescription": {
                      "type": "string",
                      "example": "Translated short description"
                    }
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "example": "Menu name"
              },
              "externalId": {
                "type": "string",
                "example": "ext_m2"
              },
              "type": {
                "type": "string",
                "example": "menu"
              },
              "position": {
                "type": "integer",
                "example": 2
              },
              "public": {
                "type": "boolean",
                "example": true
              },
              "allowedOrderTypes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "delivery"
                }
              },
              "shortDescription": {
                "type": "string",
                "example": "Menu description"
              },
              "menuSections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "externalId": {
                      "type": "string",
                      "example": "ext_ms_3"
                    },
                    "name": {
                      "type": "string",
                      "example": "First menu section name"
                    },
                    "shortDescription": {
                      "type": "string",
                      "example": "First menu section description"
                    },
                    "position": {
                      "type": "integer",
                      "example": 1
                    },
                    "productsIds": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "example": 12391
                      }
                    },
                    "translations": {
                      "type": "object",
                      "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Translated name"
                          },
                          "shortDescription": {
                            "type": "string",
                            "example": "Translated short description"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "translations": {
                "type": "object",
                "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Translated name"
                    },
                    "shortDescription": {
                      "type": "string",
                      "example": "Translated short description"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "PosMenu": {
        "type": "object",
        "description": "",
        "example": [],
        "properties": []
      },
      "MenuInputData": {
        "type": "object",
        "description": "",
        "example": {
          "id": 77261,
          "name": "New menu name",
          "externalId": "new_set_menu_external_id",
          "type": "setmenu",
          "position": 3,
          "public": true,
          "allowedOrderTypes": [
            "delivery",
            "collection"
          ],
          "availableFrom": "2017-02-01T00:00:00+0000",
          "availableTo": "2017-02-12T00:00:00+0000",
          "price": {
            "amount": 12.75,
            "vatValue": 10
          },
          "shortDescription": "New set menu description",
          "menuSections": [
            {
              "id": 223991,
              "externalId": "new_menu_section_external_id",
              "name": "New menu section name",
              "shortDescription": "New menu section description",
              "position": 1,
              "minSelection": 1,
              "maxSelection": 1,
              "productsIds": [
                321212,
                321213,
                321214
              ],
              "translations": {
                "es": {
                  "name": "Translated name",
                  "shortDescription": "Translated short description"
                }
              }
            },
            {
              "id": 223992
            },
            {
              "externalId": "new_menu_section_created_external_id",
              "name": "New menu section created name",
              "shortDescription": "New menu section created description",
              "position": 2,
              "minSelection": 1,
              "maxSelection": 1,
              "productsIds": [
                55321,
                55322,
                55323
              ],
              "translations": {
                "es": {
                  "name": "Translated name",
                  "shortDescription": "Translated short description"
                }
              }
            }
          ],
          "translations": {
            "es": {
              "name": "Translated name",
              "shortDescription": "Translated short description"
            }
          }
        },
        "properties": {
          "id": {
            "type": "integer",
            "example": 77261
          },
          "name": {
            "type": "string",
            "example": "New menu name"
          },
          "externalId": {
            "type": "string",
            "example": "new_set_menu_external_id"
          },
          "type": {
            "type": "string",
            "example": "setmenu"
          },
          "position": {
            "type": "integer",
            "example": 3
          },
          "public": {
            "type": "boolean",
            "example": true
          },
          "allowedOrderTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "delivery"
            }
          },
          "availableFrom": {
            "type": "string",
            "example": "2017-02-01T00:00:00+0000"
          },
          "availableTo": {
            "type": "string",
            "example": "2017-02-12T00:00:00+0000"
          },
          "price": {
            "$ref": "#/components/schemas/LegacyPriceInput"
          },
          "shortDescription": {
            "type": "string",
            "example": "New set menu description"
          },
          "menuSections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "example": 223991
                },
                "externalId": {
                  "type": "string",
                  "example": "new_menu_section_external_id"
                },
                "name": {
                  "type": "string",
                  "example": "New menu section name"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "New menu section description"
                },
                "position": {
                  "type": "integer",
                  "example": 1
                },
                "minSelection": {
                  "type": "integer",
                  "example": 1
                },
                "maxSelection": {
                  "type": "integer",
                  "example": 1
                },
                "productsIds": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "example": 321212
                  }
                },
                "translations": {
                  "type": "object",
                  "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "Translated name"
                      },
                      "shortDescription": {
                        "type": "string",
                        "example": "Translated short description"
                      }
                    }
                  }
                }
              }
            }
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                },
                "shortDescription": {
                  "type": "string",
                  "example": "Translated short description"
                }
              }
            }
          }
        }
      },
      "allowedOrderTypes": {
        "type": "array",
        "description": "Menu allowed order types code. More info in 'Understanding order types' section.",
        "example": [
          null
        ],
        "items": {
          "type": "string",
          "example": "string"
        }
      },
      "Partial_Menu": {
        "type": "object",
        "description": "Menu with minimum important information",
        "example": {
          "id": 543,
          "name": "Pizzas",
          "type": "menu",
          "position": 1,
          "allowedOrderTypes": [
            "delivery",
            "collection",
            "insitu",
            "inside"
          ],
          "price": null,
          "public": true,
          "externalId": "external_reference",
          "translations": {
            "es": {
              "name": "Translated name"
            }
          }
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Menu identifier",
            "example": 0
          },
          "name": {
            "type": "string",
            "description": "Menu name",
            "example": "string"
          },
          "type": {
            "type": "string",
            "description": "Menu type code",
            "enum": [
              "menu",
              "setmenu"
            ],
            "example": "menu"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "description": "Menu position",
            "example": 0
          },
          "allowedOrderTypes": {
            "$ref": "#/components/schemas/allowedOrderTypes"
          },
          "price": {
            "type": "number",
            "format": "float",
            "description": "Menu price",
            "example": 0
          },
          "public": {
            "type": "boolean",
            "description": "Returns true if the menu is public and can be displayed for consumers",
            "example": true
          },
          "externalId": {
            "type": "string",
            "description": "Custom identifier",
            "example": "string"
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                }
              }
            }
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "Schema19623": {
        "type": "array",
        "description": null,
        "example": [
          {
            "id": 543,
            "name": "Pizzas",
            "type": "menu",
            "position": 1,
            "allowedOrderTypes": [
              "delivery",
              "collection",
              "insitu",
              "inside"
            ],
            "price": null,
            "public": true,
            "externalId": "external_reference",
            "translations": {
              "es": {
                "name": "Translated name"
              }
            }
          }
        ],
        "items": {
          "$ref": "#/components/schemas/Partial_Menu"
        }
      },
      "Consumer": {
        "type": "object",
        "description": "",
        "example": {
          "id": 1003,
          "email": "john@example.com",
          "name": "John",
          "lastname": "Doe",
          "image": "https://example.com/assets/images/placeholder_image.jpg",
          "phone": "+34600000000",
          "posClientId": "CCCC-CCCC-CCCC",
          "marketClientId": "MMMM-MMMM-MMMM"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Consumer identifier",
            "example": 0
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Consumer email; null when the consumer gave none (as in the example orders)",
            "example": "string"
          },
          "name": {
            "type": "string",
            "description": "Consumer name",
            "example": "string"
          },
          "lastname": {
            "type": "string",
            "description": "Consumer last name",
            "example": "string"
          },
          "image": {
            "type": "string",
            "description": "Consumer profile image url",
            "example": "string"
          },
          "phone": {
            "type": "string",
            "description": "In international format. Ex. +34600000000",
            "example": "string"
          },
          "posClientId": {
            "type": "string",
            "description": "POS client identifier",
            "example": "string"
          },
          "marketClientId": {
            "type": "string",
            "description": "Market client identifier",
            "example": "string"
          },
          "notificationsChannel": {
            "type": "string",
            "description": "Consumer notifications channel token",
            "example": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "phone"
        ]
      },
      "OrderStatus": {
        "type": "object",
        "description": "Current order status",
        "example": {
          "code": "waiting_sp_validation",
          "name": "Waiting selling point validation",
          "color": "#f7981d",
          "isFinalStatus": false,
          "globalStatusCode": "processing"
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Status identifier code",
            "enum": [
              "waiting_sp_validation",
              "accepted",
              "preparation",
              "ready",
              "delivering",
              "delivered",
              "incident",
              "cancelled",
              "finished",
              "reservation_accepted",
              "cancelled_by_sp",
              "cancelled_by_client",
              "cancelled_by_driver",
              "cancelled_by_team",
              "payment_authorisation_failed"
            ],
            "example": "waiting_sp_validation"
          },
          "name": {
            "type": "string",
            "description": "Status name",
            "example": "string"
          },
          "color": {
            "type": "string",
            "description": "HEX color code for the status",
            "example": "string"
          },
          "isFinalStatus": {
            "type": "boolean",
            "description": "Return if status is final status and doesn't require interaction",
            "example": true
          },
          "globalStatusCode": {
            "type": "string",
            "description": "Order global status identifier code",
            "example": "string"
          }
        },
        "required": [
          "code",
          "name",
          "color"
        ]
      },
      "Address": {
        "type": "object",
        "description": "Selling point address",
        "example": {
          "id": 1003,
          "street": "C/ Example, 23",
          "details": "Canada building",
          "city": "City name",
          "province": "Province name",
          "postalCode": "12345",
          "latitude": 41.308166,
          "longitude": 2.019725,
          "googlePlaceId": "xxxxxxxxxxxx",
          "placeName": "C/ Example, 23, City name"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Address identifier",
            "example": 0
          },
          "street": {
            "type": "string",
            "description": "Address street with number",
            "example": "string"
          },
          "details": {
            "type": "string",
            "description": "Extra address information",
            "example": "string"
          },
          "city": {
            "type": "string",
            "description": "Address city name",
            "example": "string"
          },
          "province": {
            "type": "string",
            "description": "Address province name",
            "example": "string"
          },
          "postalCode": {
            "type": "string",
            "description": "Address postal code",
            "example": "string"
          },
          "latitude": {
            "type": "number",
            "format": "float",
            "description": "Address latitude",
            "example": 0
          },
          "longitude": {
            "type": "number",
            "format": "float",
            "description": "Address longitude",
            "example": 0
          },
          "googlePlaceId": {
            "type": "string",
            "description": "Google place identifier",
            "example": "string"
          },
          "placeName": {
            "type": "string",
            "description": "Place name",
            "example": "string"
          }
        },
        "required": [
          "id",
          "street"
        ]
      },
      "SellingPoint": {
        "type": "object",
        "description": "Selling point data",
        "example": {
          "id": 3442,
          "name": "My restaurant",
          "address": {
            "id": 1003,
            "street": "C/ Example, 23",
            "details": "Canada building",
            "city": "City name",
            "province": "Province name",
            "postalCode": "12345",
            "latitude": 41.308166,
            "longitude": 2.019725,
            "googlePlaceId": "xxxxxxxxxxxx",
            "placeName": "C/ Example, 23, City name"
          },
          "phone": "+34600000000",
          "email": "myrestaurant@example.com",
          "logo": "http://mycdn.com/selling-point-logo.jpeg",
          "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
          "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
          "urlKey": "restaurant-name-city",
          "type": "Italian",
          "timezone": "Europe/Madrid"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Selling point identifier",
            "example": 0
          },
          "name": {
            "type": "string",
            "description": "Selling point name",
            "example": "string"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "phone": {
            "type": "string",
            "description": "Selling point phone",
            "example": "string"
          },
          "email": {
            "type": "string",
            "description": "Selling point contact email",
            "example": "string"
          },
          "logo": {
            "type": "string",
            "description": "Selling point logo url",
            "example": "string"
          },
          "mainImage": {
            "type": "string",
            "description": "Selling point main image",
            "example": "string"
          },
          "listImage": {
            "type": "string",
            "description": "Selling point list image",
            "example": "string"
          },
          "urlKey": {
            "type": "string",
            "description": "Encoded name for url",
            "example": "string"
          },
          "type": {
            "type": "string",
            "description": "Type of selling point",
            "example": "string"
          },
          "timezone": {
            "type": "string",
            "description": "Selling point time zone",
            "example": "string"
          },
          "mainImageLarge": {
            "type": "string",
            "description": "Selling point main image large",
            "example": "string"
          },
          "listImageLarge": {
            "type": "string",
            "description": "Selling point list image large",
            "example": "string"
          }
        },
        "required": [
          "id",
          "name",
          "address"
        ]
      },
      "PaymentStatus": {
        "type": "object",
        "description": "Payment status",
        "example": {
          "code": "DONE",
          "name": "Finalizado",
          "color": "#5AAC44",
          "callToAction": null
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Status identifier code. CREATED and AUTHORIZED: the payment was started or authorised and is not captured yet",
            "enum": [
              "CREATED",
              "AUTHORIZED",
              "DONE",
              "FAILED",
              "CANCELLED"
            ],
            "example": "DONE"
          },
          "name": {
            "type": "string",
            "description": "Status name",
            "example": "string"
          },
          "color": {
            "type": "string",
            "description": "HEX color code for the status",
            "example": "string"
          },
          "callToAction": {
            "type": "string",
            "description": "Call to action if is needed",
            "example": "string"
          }
        },
        "required": [
          "code",
          "name",
          "color"
        ]
      },
      "Payment": {
        "type": "object",
        "description": "Payment",
        "example": {
          "id": 5922,
          "amount": 29.9,
          "paymentMethodName": "Credit card",
          "prepaid": true,
          "methodCode": "CREDIT_CARD",
          "status": {
            "code": "DONE",
            "name": "Finalizado",
            "color": "#5AAC44",
            "callToAction": null
          }
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Order payment identifier",
            "example": 0
          },
          "amount": {
            "type": "number",
            "format": "float",
            "description": "Payment amount",
            "example": 0
          },
          "paymentMethodName": {
            "type": "string",
            "description": "Payment method name",
            "example": "string"
          },
          "prepaid": {
            "type": "boolean",
            "description": "True if the payment has already been paid",
            "example": true
          },
          "methodCode": {
            "type": "string",
            "description": "Payment method identifier code",
            "example": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          }
        },
        "required": [
          "id",
          "amount",
          "paymentMethodName"
        ]
      },
      "payments": {
        "type": "array",
        "description": "Order payments",
        "example": [
          {
            "id": 5922,
            "amount": 29.9,
            "paymentMethodName": "Credit card",
            "prepaid": true,
            "methodCode": "CREDIT_CARD",
            "status": {
              "code": "DONE",
              "name": "Finalizado",
              "color": "#5AAC44",
              "callToAction": null
            }
          }
        ],
        "items": {
          "$ref": "#/components/schemas/Payment"
        }
      },
      "Product": {
        "type": "object",
        "description": "Only for orderLine type PRODUCT",
        "example": {
          "id": "843"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Product identifier",
            "example": 0
          },
          "externalId": {
            "type": "string",
            "description": "Custom identifier",
            "example": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "Menu": {
        "type": "object",
        "description": "Only for orderLine type MENU",
        "example": {
          "id": 543
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Menu identifier",
            "example": 0
          },
          "externalId": {
            "type": "string",
            "description": "Custom identifier",
            "example": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "Discount": {
        "type": "object",
        "description": "Only for orderLine type DISCOUNT",
        "example": {
          "id": "233"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Discount identifier",
            "example": 0
          }
        },
        "required": [
          "id"
        ]
      },
      "Coupon": {
        "type": "object",
        "description": "Only for orderLine type DISCOUNT",
        "example": {
          "code": "first10"
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Coupon code",
            "example": "string"
          }
        },
        "required": [
          "code"
        ]
      },
      "OrderLine": {
        "type": "object",
        "description": "",
        "example": {
          "totalAmount": 29.9,
          "unitPrice": 14.95,
          "quantity": 2,
          "comment": "Order line comment",
          "label": "Pizza margherita",
          "type": "PRODUCT",
          "distance": null,
          "product": {
            "id": "843"
          },
          "menu": {
            "id": 543
          },
          "productOption": {
            "id": "233"
          },
          "discount": {
            "id": "233"
          },
          "coupon": {
            "code": "first10"
          },
          "childrenOrderLines": [
            null
          ]
        },
        "properties": {
          "totalAmount": {
            "type": "number",
            "format": "float",
            "description": "Order line total amount VAT included",
            "example": 0
          },
          "unitPrice": {
            "type": "number",
            "format": "float",
            "description": "Order line total amount VAT included",
            "example": 0
          },
          "quantity": {
            "type": "integer",
            "format": "int64",
            "description": "Order line quantity",
            "example": 0
          },
          "comment": {
            "type": "string",
            "description": "Order line comment",
            "example": "string"
          },
          "label": {
            "type": "string",
            "description": "Order line label",
            "example": "string"
          },
          "type": {
            "type": "string",
            "description": "Type code",
            "enum": [
              "PRODUCT",
              "MENU",
              "PRODUCT_OPTION",
              "DISCOUNT",
              "DELIVERY",
              "CUSTOM",
              "POS_ITEM"
            ],
            "example": "PRODUCT"
          },
          "distance": {
            "type": "number",
            "format": "float",
            "description": "Only used in delivery order lines",
            "example": 0
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "menu": {
            "$ref": "#/components/schemas/Menu"
          },
          "productOption": {
            "$ref": "#/components/schemas/ProductOption"
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "coupon": {
            "$ref": "#/components/schemas/Coupon"
          },
          "childrenOrderLines": {
            "$ref": "#/components/schemas/OrderLine"
          },
          "baseAmount": {
            "type": "number",
            "format": "float",
            "description": "Total order line amount VAT excluded",
            "example": 0
          },
          "vatAmount": {
            "type": "number",
            "format": "float",
            "description": "Total order line VAT amount",
            "example": 0
          },
          "vatValue": {
            "type": "number",
            "format": "float",
            "description": "Applied order line VAT value",
            "example": 0
          }
        },
        "required": [
          "totalAmount",
          "unitPrice",
          "quantity",
          "label",
          "type",
          "baseAmount",
          "vatAmount",
          "vatValue"
        ]
      },
      "orderLines": {
        "type": "array",
        "description": "Order items",
        "example": [
          {
            "totalAmount": 29.9,
            "unitPrice": 14.95,
            "quantity": 2,
            "comment": "Order line comment",
            "label": "Pizza margherita",
            "type": "PRODUCT",
            "distance": null,
            "product": {
              "id": "843"
            },
            "menu": {
              "id": 543
            },
            "productOption": {
              "id": "233"
            },
            "discount": {
              "id": "233"
            },
            "coupon": {
              "code": "first10"
            },
            "childrenOrderLines": [
              null
            ]
          }
        ],
        "items": {
          "$ref": "#/components/schemas/OrderLine"
        }
      },
      "Delivery_address": {
        "type": "object",
        "description": "Only for delivery orders",
        "example": {
          "id": 1003,
          "street": "C/ Example, 23",
          "details": "Canada building",
          "city": "City name",
          "province": "Province name",
          "postalCode": "12345",
          "latitude": 41.308166,
          "longitude": 2.019725,
          "googlePlaceId": "xxxxxxxxxxxx",
          "placeName": "C/ Example, 23, City name"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Address identifier",
            "example": 0
          },
          "street": {
            "type": "string",
            "description": "Address street with number",
            "example": "string"
          },
          "details": {
            "type": "string",
            "description": "Extra address information",
            "example": "string"
          },
          "city": {
            "type": "string",
            "description": "Address city name",
            "example": "string"
          },
          "province": {
            "type": "string",
            "description": "Address province name",
            "example": "string"
          },
          "postalCode": {
            "type": "string",
            "description": "Address postal code",
            "example": "string"
          },
          "latitude": {
            "type": "number",
            "format": "float",
            "description": "Address latitude",
            "example": 0
          },
          "longitude": {
            "type": "number",
            "format": "float",
            "description": "Address longitude",
            "example": 0
          },
          "googlePlaceId": {
            "type": "string",
            "description": "Google place identifier",
            "example": "string"
          },
          "placeName": {
            "type": "string",
            "description": "Place name",
            "example": "string"
          }
        },
        "required": [
          "id",
          "street"
        ]
      },
      "TransportType": {
        "type": "object",
        "description": "",
        "example": {
          "code": "SCOOTER",
          "name": "Scooter"
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Transport type identifier code",
            "enum": [
              "BIKE",
              "SCOOTER",
              "MOTORBIKE",
              "CAR",
              "VAN",
              "WALKING"
            ],
            "example": "BIKE"
          },
          "name": {
            "type": "string",
            "description": "Transport type name",
            "example": "string"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "Geolocation": {
        "type": "object",
        "description": "Driver last geolocation",
        "example": {
          "latitude": 41.308166,
          "longitude": 2.019725,
          "createdAt": "2018-03-015T12:15:00+0000"
        },
        "properties": {
          "latitude": {
            "type": "number",
            "format": "float",
            "description": "Geolocation latitude",
            "example": 0
          },
          "longitude": {
            "type": "number",
            "format": "float",
            "description": "Geolocation longitude",
            "example": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Geolocation creation time",
            "example": "string"
          }
        },
        "required": [
          "latitude",
          "longitude",
          "createdAt"
        ]
      },
      "Driver": {
        "type": "object",
        "description": "Delivery driver",
        "example": {
          "id": 1003,
          "email": "john@example.com",
          "name": "John",
          "lastname": "Doe",
          "image": "https://example.com/assets/images/placeholder_image.jpg",
          "phone": "+34600000000",
          "transport": {
            "code": "SCOOTER",
            "name": "Scooter"
          },
          "lastGeolocation": {
            "latitude": 41.308166,
            "longitude": 2.019725,
            "createdAt": "2018-03-015T12:15:00+0000"
          }
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Driver identifier",
            "example": 0
          },
          "email": {
            "type": "string",
            "description": "Driver email",
            "example": "string"
          },
          "name": {
            "type": "string",
            "description": "Driver name",
            "example": "string"
          },
          "lastname": {
            "type": "string",
            "description": "Driver last name",
            "example": "string"
          },
          "image": {
            "type": "string",
            "description": "Driver image url",
            "example": "string"
          },
          "phone": {
            "type": "string",
            "description": "In international format. Ex. +34600000000",
            "example": "string"
          },
          "transport": {
            "$ref": "#/components/schemas/TransportType"
          },
          "lastGeolocation": {
            "$ref": "#/components/schemas/Geolocation"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "lastname",
          "phone",
          "transport"
        ]
      },
      "DeliveryStatus": {
        "type": "object",
        "description": "Status of a delivery (not of the order)",
        "example": {
          "code": "PICKING",
          "name": "Picking",
          "color": "blue",
          "isFinalStatus": false
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Delivery status code",
            "enum": [
              "WAITING_SELLING_POINT_ACCEPTANCE",
              "WAITING_PROCESSING_TIME",
              "ASSIGNATION_PENDING",
              "WAITING_DRIVER_ACCEPTANCE",
              "PICKING",
              "WAITING_SELLING_POINT_PREPARATION",
              "DELIVERING",
              "WAITING_CUSTOMER",
              "PREASSIGNATION_PENDING",
              "ACCEPTED_BY_DRIVER",
              "REFUSED_BY_DRIVER",
              "UNASSIGNED_BY_DISPATCH",
              "DELIVERED",
              "CANCELLED",
              "INCIDENT",
              "CANCELLED_BY_DRIVER",
              "IN_PROGRESS_WITHOUT_SPECIFIC_STATUS"
            ],
            "example": "PICKING"
          },
          "name": {
            "type": "string",
            "description": "Delivery status name",
            "example": "Picking"
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Colour of the status",
            "example": "blue"
          },
          "isFinalStatus": {
            "type": "boolean",
            "description": "Whether the delivery is over",
            "example": false
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "Delivery": {
        "type": "object",
        "description": "Order delivery",
        "example": {
          "id": 1003,
          "deliveryAccountName": "DeliveryCompanyName",
          "deliveryAccountPhone": "600000001",
          "pickupAddress": {
            "id": 1003,
            "street": "C/ Example, 23",
            "details": "Canada building",
            "city": "City name",
            "province": "Province name",
            "postalCode": "12345",
            "latitude": 41.308166,
            "longitude": 2.019725,
            "googlePlaceId": "xxxxxxxxxxxx",
            "placeName": "C/ Example, 23, City name"
          },
          "deliveryAddress": {
            "id": 1003,
            "street": "C/ Example, 23",
            "details": "Canada building",
            "city": "City name",
            "province": "Province name",
            "postalCode": "12345",
            "latitude": 41.308166,
            "longitude": 2.019725,
            "googlePlaceId": "xxxxxxxxxxxx",
            "placeName": "C/ Example, 23, City name"
          },
          "pickupAgreedAt": "2017-02-09T12:00:00+0000",
          "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
          "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
          "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
          "deliveryInstructions": null,
          "linearDistance": "1.56",
          "realDistance": "1.97",
          "estimatedDeliveryDuration": "15",
          "status": {
            "code": "PICKING",
            "name": "Picking",
            "color": "blue",
            "isFinalStatus": false
          },
          "destinationContactEmail": "jane@example.com",
          "destinationContactName": "Jane",
          "destinationContactPhone": "600000000",
          "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
          "driver": {
            "id": 1003,
            "email": "john@example.com",
            "name": "John",
            "lastname": "Doe",
            "image": "https://example.com/assets/images/placeholder_image.jpg",
            "phone": "+34600000000",
            "transport": {
              "code": "SCOOTER",
              "name": "Scooter"
            },
            "lastGeolocation": {
              "latitude": 41.308166,
              "longitude": 2.019725,
              "createdAt": "2018-03-015T12:15:00+0000"
            }
          },
          "isSelfDelivery": false
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Delivery identifier",
            "example": 0
          },
          "deliveryAccountName": {
            "type": "string",
            "description": "Delivery company name",
            "example": "string"
          },
          "deliveryAccountPhone": {
            "type": "string",
            "description": "Delivery company contact phone",
            "example": "string"
          },
          "pickupAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "pickupAgreedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Pickup agreed time",
            "example": "string"
          },
          "pickupConfirmedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Confirmed pickup time",
            "example": "string"
          },
          "deliveryAgreedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Delivery agreed time",
            "example": "string"
          },
          "deliveryConfirmedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Confirmed delivery time",
            "example": "string"
          },
          "deliveryInstructions": {
            "type": "string",
            "description": "Driver instructions",
            "example": "string"
          },
          "linearDistance": {
            "type": "number",
            "format": "float",
            "description": "Linear distance between pickup and delivery points",
            "example": 0
          },
          "realDistance": {
            "type": "number",
            "format": "float",
            "description": "Real distance between pickup and delivery points",
            "example": 0
          },
          "estimatedDeliveryDuration": {
            "type": "number",
            "format": "float",
            "description": "Estimated delivery duration in minutes",
            "example": 0
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryStatus"
          },
          "destinationContactEmail": {
            "type": "string",
            "description": "Destination contact email",
            "example": "string"
          },
          "destinationContactName": {
            "type": "string",
            "description": "Destination contact name",
            "example": "string"
          },
          "destinationContactPhone": {
            "type": "string",
            "description": "Destination contact phone number",
            "example": "string"
          },
          "route": {
            "type": "string",
            "description": "Polyline describing driver route",
            "example": "string"
          },
          "driver": {
            "$ref": "#/components/schemas/Driver"
          },
          "isSelfDelivery": {
            "type": "boolean",
            "description": "Return if delivery is done by selling point drivers",
            "example": true
          },
          "forSenderInstructions": {
            "type": "string",
            "description": "Instructions for sender, for example pay the delivery",
            "example": "string"
          },
          "deliveryTrackingUrl": {
            "type": "string",
            "description": "Delivery tracking url",
            "example": "string"
          }
        },
        "required": [
          "id",
          "pickupAddress",
          "deliveryAddress",
          "pickupAgreedAt",
          "pickupConfirmedAt",
          "deliveryAgreedAt",
          "deliveryConfirmedAt",
          "linearDistance",
          "estimatedDeliveryDuration",
          "status"
        ]
      },
      "deliveries": {
        "type": "array",
        "description": "Order deliveries",
        "example": [
          {
            "id": 1003,
            "deliveryAccountName": "DeliveryCompanyName",
            "deliveryAccountPhone": "600000001",
            "pickupAddress": {
              "id": 1003,
              "street": "C/ Example, 23",
              "details": "Canada building",
              "city": "City name",
              "province": "Province name",
              "postalCode": "12345",
              "latitude": 41.308166,
              "longitude": 2.019725,
              "googlePlaceId": "xxxxxxxxxxxx",
              "placeName": "C/ Example, 23, City name"
            },
            "deliveryAddress": {
              "id": 1003,
              "street": "C/ Example, 23",
              "details": "Canada building",
              "city": "City name",
              "province": "Province name",
              "postalCode": "12345",
              "latitude": 41.308166,
              "longitude": 2.019725,
              "googlePlaceId": "xxxxxxxxxxxx",
              "placeName": "C/ Example, 23, City name"
            },
            "pickupAgreedAt": "2017-02-09T12:00:00+0000",
            "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
            "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
            "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
            "deliveryInstructions": null,
            "linearDistance": "1.56",
            "realDistance": "1.97",
            "estimatedDeliveryDuration": "15",
            "status": {
              "code": "PICKING",
              "name": "Picking",
              "color": "blue",
              "isFinalStatus": false
            },
            "destinationContactEmail": "jane@example.com",
            "destinationContactName": "Jane",
            "destinationContactPhone": "600000000",
            "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
            "driver": {
              "id": 1003,
              "email": "john@example.com",
              "name": "John",
              "lastname": "Doe",
              "image": "https://example.com/assets/images/placeholder_image.jpg",
              "phone": "+34600000000",
              "transport": {
                "code": "SCOOTER",
                "name": "Scooter"
              },
              "lastGeolocation": {
                "latitude": 41.308166,
                "longitude": 2.019725,
                "createdAt": "2018-03-015T12:15:00+0000"
              }
            },
            "isSelfDelivery": false
          }
        ],
        "items": {
          "$ref": "#/components/schemas/Delivery"
        }
      },
      "Market": {
        "type": "object",
        "description": "Order Market",
        "example": {
          "name": "My Restaurant",
          "darkLogo": "http://mycdn.com/darkLogo.jpeg",
          "lightLogo": "http://mycdn.com/lightLogo.jpeg",
          "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
          "squareLogo": "http://mycdn.com/squareLogo.jpeg"
        },
        "properties": {
          "name": {
            "type": "string",
            "description": "Market name",
            "example": "string"
          },
          "darkLogo": {
            "type": "string",
            "description": "Dark logo url",
            "example": "string"
          },
          "lightLogo": {
            "type": "string",
            "description": "Light logo url",
            "example": "string"
          },
          "horizontalLogo": {
            "type": "string",
            "description": "Horizontal logo url",
            "example": "string"
          },
          "squareLogo": {
            "type": "string",
            "description": "Square logo url",
            "example": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "Currency": {
        "type": "object",
        "description": "Currency",
        "example": {
          "isoCode": "EUR",
          "symbol": "€"
        },
        "properties": {
          "isoCode": {
            "type": "string",
            "description": "Currency ISO code",
            "example": "string"
          },
          "symbol": {
            "type": "string",
            "description": "Currency symbol",
            "example": "string"
          }
        },
        "required": [
          "isoCode",
          "symbol"
        ]
      },
      "OrderResponse": {
        "description": "Polymorphic order response. The `type` field selects exactly one of the five supported order shapes.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DeliveryOrder"
          },
          {
            "$ref": "#/components/schemas/CollectionOrder"
          },
          {
            "$ref": "#/components/schemas/InsituOrder"
          },
          {
            "$ref": "#/components/schemas/ReservationOrder"
          },
          {
            "$ref": "#/components/schemas/InsideOrder"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "delivery": "#/components/schemas/DeliveryOrder",
            "collection": "#/components/schemas/CollectionOrder",
            "insitu": "#/components/schemas/InsituOrder",
            "reservation": "#/components/schemas/ReservationOrder",
            "inside": "#/components/schemas/InsideOrder"
          }
        }
      },
      "CollectionOrder": {
        "description": "Collection order. It contains the common order fields and has no delivery, table-service or diner-specific fields.",
        "example": {
          "id": 422430,
          "type": "collection",
          "totalAmount": 24.5,
          "executionTime": "2026-07-20T13:30:00+0000",
          "isAsap": false,
          "status": {
            "code": "waiting_sp_validation",
            "name": "Waiting for business validation",
            "globalStatusCode": "processing"
          },
          "orderLines": [],
          "payments": []
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "collection",
                "description": "Collection order discriminator"
              }
            },
            "required": [
              "type"
            ]
          }
        ]
      },
      "DeliveryOrder": {
        "description": "Delivery order. In addition to the common order fields it includes the delivery price, destination and delivery executions.",
        "example": {
          "id": 422429,
          "type": "delivery",
          "totalAmount": 29.9,
          "executionTime": "2026-07-20T13:45:00+0000",
          "isAsap": true,
          "status": {
            "code": "accepted",
            "name": "Accepted",
            "globalStatusCode": "processing"
          },
          "deliveryAmount": 2.5,
          "deliveryAddress": {
            "street": "Carrer de la Tecnologia, 17",
            "city": "Viladecans",
            "postalCode": "08840"
          },
          "deliveries": [],
          "orderLines": [],
          "payments": []
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "delivery",
                "description": "Delivery order discriminator"
              },
              "deliveryAmount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Delivery amount, VAT included"
              },
              "deliveryAddress": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Delivery_address"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "deliveries": {
                "$ref": "#/components/schemas/deliveries"
              }
            },
            "required": [
              "type",
              "deliveryAmount",
              "deliveryAddress",
              "deliveries"
            ]
          }
        ]
      },
      "InsituOrder": {
        "description": "On-premise reservation-style order (`insitu`). It includes the number of diners.",
        "example": {
          "id": 422431,
          "type": "insitu",
          "totalAmount": 0,
          "executionTime": "2026-07-20T14:00:00+0000",
          "dinersNumber": 4,
          "status": {
            "code": "accepted",
            "name": "Accepted",
            "globalStatusCode": "processing"
          },
          "orderLines": [],
          "payments": []
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "insitu",
                "description": "Insitu order discriminator"
              },
              "dinersNumber": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of diners"
              }
            },
            "required": [
              "type",
              "dinersNumber"
            ]
          }
        ]
      },
      "ReservationOrder": {
        "description": "Reservation order. It includes the number of diners.",
        "example": {
          "id": 422432,
          "type": "reservation",
          "totalAmount": 0,
          "executionTime": "2026-07-20T20:30:00+0000",
          "dinersNumber": 6,
          "status": {
            "code": "waiting_sp_validation",
            "name": "Waiting for business validation",
            "globalStatusCode": "processing"
          },
          "orderLines": [],
          "payments": []
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "reservation",
                "description": "Reservation order discriminator"
              },
              "dinersNumber": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of diners"
              }
            },
            "required": [
              "type",
              "dinersNumber"
            ]
          }
        ]
      },
      "InsideOrder": {
        "description": "Table-service order (`inside`). It includes the number of diners and the service location, such as the table and its service zone.",
        "example": {
          "id": 422433,
          "type": "inside",
          "totalAmount": 42.75,
          "executionTime": "2026-07-20T21:00:00+0000",
          "dinersNumber": 3,
          "serviceLocation": {
            "id": 91,
            "code": "TABLE-12",
            "name": "Table 12",
            "externalId": "POS-TABLE-12",
            "serviceZone": {
              "code": "DINING-ROOM",
              "name": "Dining room",
              "externalId": "POS-ZONE-1"
            }
          },
          "status": {
            "code": "accepted",
            "name": "Accepted",
            "globalStatusCode": "processing"
          },
          "orderLines": [],
          "payments": []
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "inside",
                "description": "Inside order discriminator"
              },
              "dinersNumber": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of diners"
              },
              "serviceLocation": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "code": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "externalId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "serviceZone": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "externalId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "dinersNumber",
              "serviceLocation"
            ]
          }
        ]
      },
      "Order": {
        "type": "object",
        "description": "Fields shared by every order type. Use OrderResponse for an actual API response so the type-specific fields are represented.",
        "example": {
          "id": 422429,
          "orderGroupId": null,
          "totalAmount": 58.85,
          "executionTimeLabel": "hoy 24/07 a las 07:05h",
          "preparationTimeLabel": "hoy 24/07 a las 06:55h",
          "comment": "This is the order comment!",
          "cancellationComment": null,
          "consumer": {
            "id": 19077,
            "name": "Client_99041",
            "lastname": "Lastname_99041",
            "email": null,
            "phone": "+34600000000",
            "image": null,
            "notificationsChannel": "d4788ad4deca6d07937eac0dbc96aef0",
            "chatToken": null,
            "posClientId": null,
            "marketClientId": null
          },
          "status": {
            "code": "waiting_sp_validation",
            "name": "Esperando validación del negocio",
            "color": "#f7981d",
            "isFinalStatus": false,
            "globalStatusCode": "processing"
          },
          "type": "delivery",
          "sellingPoint": {
            "id": 3961,
            "name": "SuperPizza",
            "address": {
              "id": 16187,
              "street": "Carrer de la Tecnologia, 17",
              "details": "",
              "city": "Viladecans",
              "province": "Barcelona",
              "postalCode": "08840",
              "latitude": 41.31372,
              "longitude": 2.031222,
              "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
              "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
              "autoGeolocated": true
            },
            "phone": "+34900000000",
            "email": "superpizza@example.com",
            "logo": "https://example.com/e4cd836538_f79efe5783_82291551976531iconImagesqd2mt.png",
            "mainImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
            "mainImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
            "listImage": "https://example.com/d770d57632_4e01533575_85091551975570baked-cheese-cherry-tomato-1552635.png",
            "listImageLarge": "https://example.com/1551975570_bab77d7d5bbcec5e64cd3c1ac22c56ee.png",
            "type": "Pizzería",
            "urlKey": "superpizza-viladecans",
            "timezone": "Europe/Madrid"
          },
          "payments": [
            {
              "id": 55066,
              "amount": 58.85,
              "paymentMethodName": "Efectivo",
              "prepaid": false,
              "methodCode": "CASH",
              "status": {
                "code": "CREATED",
                "name": "Iniciado",
                "color": "#000000",
                "isFinalStatus": false
              }
            }
          ],
          "orderLines": [
            {
              "type": "PRODUCT",
              "totalAmount": 11.5,
              "unitPrice": 11.5,
              "quantity": 1,
              "label": "Pizza de la huerta",
              "comment": "Comment 1",
              "childrenOrderLines": [
                {
                  "type": "PRODUCT_OPTION",
                  "totalAmount": 0.5,
                  "unitPrice": 0.5,
                  "quantity": 1,
                  "label": "Cebolla",
                  "comment": null,
                  "childrenOrderLines": [],
                  "baseAmount": 0.45,
                  "vatAmount": 0.05,
                  "vatValue": 10,
                  "productOption": {
                    "id": 234820,
                    "externalId": null
                  }
                }
              ],
              "baseAmount": 10.45,
              "vatAmount": 1.05,
              "vatValue": 10,
              "product": {
                "id": 109838,
                "externalId": null
              }
            },
            {
              "type": "PRODUCT",
              "totalAmount": 41.85,
              "unitPrice": 13.95,
              "quantity": 3,
              "label": "Pizza 4 estaciones",
              "comment": null,
              "childrenOrderLines": [
                {
                  "type": "PRODUCT_OPTION",
                  "totalAmount": 1,
                  "unitPrice": 1,
                  "quantity": 1,
                  "label": "Champiñones",
                  "comment": null,
                  "childrenOrderLines": [],
                  "baseAmount": 0.91,
                  "vatAmount": 0.09,
                  "vatValue": 10,
                  "productOption": {
                    "id": 234818,
                    "externalId": null
                  }
                }
              ],
              "baseAmount": 38.05,
              "vatAmount": 3.8,
              "vatValue": 10,
              "product": {
                "id": 109839,
                "externalId": null
              }
            },
            {
              "type": "PRODUCT",
              "totalAmount": 4.5,
              "unitPrice": 1.5,
              "quantity": 3,
              "label": "Agua 0.5L",
              "comment": null,
              "childrenOrderLines": [],
              "baseAmount": 4.09,
              "vatAmount": 0.41,
              "vatValue": 10,
              "product": {
                "id": 109841,
                "externalId": null
              }
            },
            {
              "type": "DELIVERY",
              "totalAmount": 1,
              "unitPrice": 1,
              "quantity": 1,
              "label": "Delivery cost",
              "comment": null,
              "childrenOrderLines": [],
              "baseAmount": 0.83,
              "vatAmount": 0.17,
              "vatValue": 21,
              "distance": 0
            }
          ],
          "isCancellable": true,
          "isAcceptable": true,
          "baseAmount": 53.42,
          "vatAmount": 5.43,
          "currency": {
            "isoCode": "EUR",
            "symbol": "€",
            "displayPattern": "{{ amount }}€"
          },
          "market": {
            "id": 554,
            "name": "SuperMarketplace",
            "darkLogo": null,
            "lightLogo": null,
            "horizontalLogo": null,
            "squareLogo": null
          },
          "createdAt": "2020-07-24T04:25:53+0000",
          "preparationTime": "2020-07-24T04:55:53+0000",
          "isAsap": false,
          "posOrderId": null,
          "marketOrderId": "99041",
          "marketOrderCode": "VLV3CW",
          "executionTime": "2020-07-24T05:05:53+0000",
          "deliveryAmount": 1,
          "deliveryAddress": {
            "id": 16343,
            "street": "Carrer de la Tecnologia, 17",
            "details": null,
            "city": "Viladecans",
            "province": "Barcelona",
            "postalCode": "08840",
            "latitude": 41.31372,
            "longitude": 2.031222,
            "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
            "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
            "autoGeolocated": true
          },
          "deliveries": [
            {
              "id": 285638,
              "status": {
                "code": "WAITING_SELLING_POINT_ACCEPTANCE",
                "name": "Esperando aceptación punto de venta",
                "color": "#f7981d",
                "isFinalStatus": false
              },
              "driver": null,
              "deliveryAccountName": null,
              "deliveryAccountPhone": null,
              "pickupAddress": {
                "id": 16187,
                "street": "Carrer de la Tecnologia, 17",
                "details": "",
                "city": "Viladecans",
                "province": "Barcelona",
                "postalCode": "08840",
                "latitude": 41.31372,
                "longitude": 2.031222,
                "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                "autoGeolocated": true
              },
              "pickupAgreedAt": "2020-07-24T04:55:53+0000",
              "pickupConfirmedAt": "2020-07-24T04:55:53+0000",
              "deliveryAddress": {
                "id": 16343,
                "street": "Carrer de la Tecnologia, 17",
                "details": null,
                "city": "Viladecans",
                "province": "Barcelona",
                "postalCode": "08840",
                "latitude": 41.31372,
                "longitude": 2.031222,
                "googlePlaceId": "ChIJRQPl5lmcpBIRXpga-ZW5xvY",
                "placeName": "Carrer de la Tecnologia, 17, 08840 Viladecans, Barcelona, España",
                "autoGeolocated": true
              },
              "deliveryAgreedAt": "2020-07-24T05:05:53+0000",
              "deliveryConfirmedAt": "2020-07-24T05:05:53+0000",
              "deliveryInstructions": null,
              "forSenderInstructions": null,
              "linearDistance": 0,
              "realDistance": null,
              "route": null,
              "estimatedDeliveryDuration": 0,
              "destinationContactEmail": null,
              "destinationContactName": "Client_99041 · Lastname_99041",
              "destinationContactPhone": "600000000",
              "isSelfDelivery": true,
              "trackingUrl": "https://example.com/tracking/example"
            }
          ]
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Order identifier",
            "example": 0
          },
          "totalAmount": {
            "type": "number",
            "format": "float",
            "description": "Total order amount VAT included",
            "example": 0
          },
          "executionTimeLabel": {
            "type": "string",
            "description": "Short text representing order execution time",
            "example": "string"
          },
          "executionTime": {
            "type": "string",
            "description": "Order execution time",
            "example": "string"
          },
          "comment": {
            "type": "string",
            "description": "Consumer order comment",
            "example": "string"
          },
          "cancellationComment": {
            "type": "string",
            "description": "Only if order is cancelled",
            "example": "string"
          },
          "consumer": {
            "$ref": "#/components/schemas/Consumer"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "type": {
            "type": "string",
            "description": "Order type code. More info in 'Understanding order types' section.",
            "enum": [
              "delivery",
              "collection",
              "insitu",
              "reservation",
              "inside"
            ],
            "example": "delivery"
          },
          "sellingPoint": {
            "$ref": "#/components/schemas/SellingPoint"
          },
          "payments": {
            "$ref": "#/components/schemas/payments"
          },
          "orderLines": {
            "$ref": "#/components/schemas/orderLines"
          },
          "deliveryAmount": {
            "type": "number",
            "format": "float",
            "description": "Delivery amount. Only for delivery orders.",
            "example": 0
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/Delivery_address"
          },
          "deliveries": {
            "$ref": "#/components/schemas/deliveries"
          },
          "dinersNumber": {
            "type": "integer",
            "format": "int64",
            "description": "Number of diners. Only for reservations, insitu and inside orders.",
            "example": 0
          },
          "isCancellable": {
            "type": "boolean",
            "description": "Returns true if order can be cancelled",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "description": "Order creation time",
            "example": "string"
          },
          "preparationTime": {
            "type": "string",
            "description": "Order preparation time",
            "example": "string"
          },
          "isAsap": {
            "type": "boolean",
            "description": "Returns true if the consumer has selected ASAP execution time",
            "example": true
          },
          "market": {
            "$ref": "#/components/schemas/Market"
          },
          "posOrderId": {
            "type": "string",
            "description": "POS order identifier",
            "example": "string"
          },
          "marketOrderId": {
            "type": "string",
            "description": "Market order identifier",
            "example": "string"
          },
          "marketOrderCode": {
            "type": "string",
            "description": "Market order code",
            "example": "string"
          },
          "baseAmount": {
            "type": "number",
            "format": "float",
            "description": "Total order amount VAT excluded",
            "example": 0
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "isAcceptable": {
            "type": "boolean",
            "description": "Shows if the order can be accepted through OpenQloud system or the order needs to be accepted using an external device",
            "example": true
          }
        },
        "required": [
          "id",
          "totalAmount",
          "executionTimeLabel",
          "executionTime",
          "consumer",
          "status",
          "type",
          "sellingPoint",
          "payments",
          "orderLines",
          "baseAmount",
          "currency",
          "isAcceptable"
        ]
      },
      "OrderAction": {
        "type": "object",
        "description": "",
        "example": {
          "token": "NzY0MHxyZWFkeXwtMXwtMXwtMXwtMQ,,",
          "callToAction": "Aceptar",
          "color": "#5aac44",
          "actionType": "ACCEPT",
          "orderType": "collection",
          "executionTime": "2017-10-12T10:10:00+0000",
          "businessCost": null,
          "delayMinutes": null,
          "pickupTime": null,
          "transportType": null
        },
        "properties": {
          "token": {
            "type": "string",
            "description": "Action identifier",
            "example": "string"
          },
          "callToAction": {
            "type": "string",
            "description": "Call to action",
            "example": "string"
          },
          "color": {
            "type": "string",
            "description": "HEX color code for the action",
            "example": "string"
          },
          "actionType": {
            "type": "string",
            "description": "Order action type",
            "enum": [
              "ACCEPT",
              "CANCEL"
            ],
            "example": "ACCEPT"
          },
          "orderType": {
            "type": "string",
            "description": "Order type code. More info in 'Understanding order types' section.",
            "enum": [
              "delivery",
              "collection",
              "insitu",
              "reservation",
              "inside"
            ],
            "example": "delivery"
          },
          "executionTime": {
            "type": "string",
            "description": "Order execution time",
            "example": "string"
          },
          "businessCost": {
            "type": "number",
            "format": "float",
            "description": "Delivery business cost. Only used in delivery orders",
            "example": 0
          },
          "delayMinutes": {
            "type": "number",
            "format": "float",
            "description": "Delay minutes from original execution time",
            "example": 0
          },
          "pickupTime": {
            "type": "string",
            "description": "Driver pickup time. Only used in delivery orders",
            "example": "string"
          },
          "transportType": {
            "type": "string",
            "description": "Transport type name. Only used in delivery orders",
            "enum": [
              "Bicicleta",
              "Scooter",
              "Motocicleta",
              "Coche",
              "Furgoneta",
              "Caminando"
            ],
            "example": "Bicicleta"
          }
        },
        "required": [
          "token",
          "callToAction",
          "color",
          "actionType",
          "orderType"
        ]
      },
      "Schema20551": {
        "type": "array",
        "description": null,
        "example": [
          {
            "token": "NzY0MHxyZWFkeXwtMXwtMXwtMXwtMQ,,",
            "callToAction": "Aceptar",
            "color": "#5aac44",
            "actionType": "ACCEPT",
            "orderType": "collection",
            "executionTime": "2017-10-12T10:10:00+0000",
            "businessCost": null,
            "delayMinutes": null,
            "pickupTime": null,
            "transportType": null
          }
        ],
        "items": {
          "$ref": "#/components/schemas/OrderAction"
        }
      },
      "NewOrderStatus": {
        "type": "object",
        "description": "Change order status using order status type",
        "example": {
          "orderStatusTypeCode": "accepted",
          "cancellationReason": "",
          "delayMinutes": 10
        },
        "properties": {
          "orderStatusTypeCode": {
            "type": "string",
            "example": "accepted"
          },
          "cancellationReason": {
            "type": "string",
            "example": ""
          },
          "delayMinutes": {
            "type": "integer",
            "example": 10
          }
        }
      },
      "Schema20757": {
        "type": "array",
        "description": null,
        "example": [
          {
            "id": 4912,
            "totalAmount": 29.9,
            "baseAmount": 27.18,
            "vatAmount": 2.72,
            "executionTimeLabel": "11/10 at 13:10h",
            "executionTime": "2017-10-11T13:10:00+0000",
            "comment": "Thank you",
            "cancellationComment": null,
            "consumer": {
              "id": 1003,
              "email": "john@example.com",
              "name": "John",
              "lastname": "Doe",
              "image": "https://example.com/assets/images/placeholder_image.jpg",
              "phone": "+34600000000",
              "posClientId": "CCCC-CCCC-CCCC",
              "marketClientId": "MMMM-MMMM-MMMM",
              "notificationsChannel": "549d70d0e0851200d11229c16f8d38a8b"
            },
            "status": {
              "code": "waiting_sp_validation",
              "name": "Waiting selling point validation",
              "color": "#f7981d",
              "isFinalStatus": false,
              "globalStatusCode": "processing"
            },
            "type": "delivery",
            "sellingPoint": {
              "id": 3442,
              "name": "My restaurant",
              "address": {
                "id": 1003,
                "street": "C/ Example, 23",
                "details": "Canada building",
                "city": "City name",
                "province": "Province name",
                "postalCode": "12345",
                "latitude": 41.308166,
                "longitude": 2.019725,
                "googlePlaceId": "xxxxxxxxxxxx",
                "placeName": "C/ Example, 23, City name"
              },
              "phone": "+34600000000",
              "email": "myrestaurant@example.com",
              "logo": "http://mycdn.com/selling-point-logo.jpeg",
              "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
              "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
              "mainImageLarge": "https://example.com/selling-point-main-image-large.png",
              "listImageLarge": "https://example.com/selling-point-list-image-large.png",
              "urlKey": "restaurant-name-city",
              "type": "Italian",
              "timezone": "Europe/Madrid"
            },
            "payments": [
              {
                "id": 5922,
                "amount": 29.9,
                "paymentMethodName": "Credit card",
                "prepaid": true,
                "methodCode": "CREDIT_CARD",
                "status": {
                  "code": "DONE",
                  "name": "Finalizado",
                  "color": "#5AAC44",
                  "callToAction": null
                }
              }
            ],
            "orderLines": [
              {
                "totalAmount": 29.9,
                "unitPrice": 14.95,
                "baseAmount": 27.78,
                "vatAmount": 2.72,
                "vatValue": 10,
                "quantity": 2,
                "comment": "Order line comment",
                "label": "Pizza margherita",
                "type": "PRODUCT",
                "product": {
                  "id": 1221,
                  "externalId": "external_reference"
                },
                "childrenOrderLines": []
              },
              {
                "totalAmount": 0,
                "unitPrice": 0,
                "quantity": 1,
                "comment": "",
                "label": "Shipping costs",
                "type": "DELIVERY",
                "distance": 1.13,
                "childrenOrderLines": []
              }
            ],
            "deliveryAmount": 1,
            "deliveryAddress": {
              "id": 1003,
              "street": "C/ Example, 23",
              "details": "Canada building",
              "city": "City name",
              "province": "Province name",
              "postalCode": "12345",
              "latitude": 41.308166,
              "longitude": 2.019725,
              "googlePlaceId": "xxxxxxxxxxxx",
              "placeName": "C/ Example, 23, City name"
            },
            "deliveries": [
              {
                "id": 1003,
                "deliveryAccountName": "DeliveryCompanyName",
                "deliveryAccountPhone": "600000001",
                "pickupAddress": {
                  "id": 1003,
                  "street": "C/ Example, 23",
                  "details": "Canada building",
                  "city": "City name",
                  "province": "Province name",
                  "postalCode": "12345",
                  "latitude": 41.308166,
                  "longitude": 2.019725,
                  "googlePlaceId": "xxxxxxxxxxxx",
                  "placeName": "C/ Example, 23, City name"
                },
                "deliveryAddress": {
                  "id": 1003,
                  "street": "C/ Example, 23",
                  "details": "Canada building",
                  "city": "City name",
                  "province": "Province name",
                  "postalCode": "12345",
                  "latitude": 41.308166,
                  "longitude": 2.019725,
                  "googlePlaceId": "xxxxxxxxxxxx",
                  "placeName": "C/ Example, 23, City name"
                },
                "pickupAgreedAt": "2017-02-09T12:00:00+0000",
                "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
                "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
                "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
                "deliveryInstructions": null,
                "linearDistance": "1.56",
                "realDistance": "1.97",
                "estimatedDeliveryDuration": "15",
                "forSenderInstructions": null,
                "trackingUrl": "https://example.com/tracking/example",
                "status": {
                  "code": "PICKING",
                  "name": "Picking",
                  "color": "blue",
                  "isFinalStatus": false
                },
                "destinationContactEmail": "jane@example.com",
                "destinationContactName": "Jane",
                "destinationContactPhone": "600000000",
                "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
                "driver": {
                  "id": 1003,
                  "email": "john@example.com",
                  "name": "John",
                  "lastname": "Doe",
                  "image": "https://example.com/assets/images/placeholder_image.jpg",
                  "phone": "+34600000000",
                  "transport": {
                    "code": "SCOOTER",
                    "name": "Scooter"
                  },
                  "lastGeolocation": {
                    "latitude": 41.308166,
                    "longitude": 2.019725,
                    "createdAt": "2018-03-015T12:15:00+0000"
                  }
                },
                "isSelfDelivery": false
              }
            ],
            "dinersNumber": 1,
            "isCancellable": true,
            "createdAt": "2017-10-11T12:30:00+0000",
            "preparationTime": "2017-10-11T13:00:00+0000",
            "isAsap": false,
            "market": {
              "name": "My Restaurant",
              "darkLogo": "http://mycdn.com/darkLogo.jpeg",
              "lightLogo": "http://mycdn.com/lightLogo.jpeg",
              "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
              "squareLogo": "http://mycdn.com/squareLogo.jpeg"
            },
            "currency": {
              "isoCode": "EUR",
              "symbol": "€"
            },
            "posOrderId": "XXXX-XXXX-XXXX",
            "marketOrderId": "ZZZZ-ZZZZ-ZZZZ",
            "marketOrderCode": "XYZ"
          }
        ],
        "items": {
          "$ref": "#/components/schemas/OrderResponse"
        }
      },
      "PosNewOrderNotification": {
        "type": "object",
        "description": "PosNewOrderNotification",
        "example": {
          "event": "new_order",
          "data": {
            "id": 4912,
            "totalAmount": 29.9,
            "baseAmount": 27.18,
            "vatAmount": 2.72,
            "executionTimeLabel": "11/10 at 13:10h",
            "executionTime": "2017-10-11T13:10:00+0000",
            "comment": "Thank you",
            "cancellationComment": "",
            "consumer": {
              "id": 1003,
              "email": "john@example.com",
              "name": "John",
              "lastname": "Doe",
              "image": "https://example.com/assets/images/placeholder_image.jpg",
              "phone": "+34600000000",
              "posClientId": "CCCC-CCCC-CCCC",
              "marketClientId": "MMMM-MMMM-MMMM",
              "notificationsChannel": "549d70d0e0851200d11229c16f8d38a8b"
            },
            "status": {
              "code": "waiting_sp_validation",
              "name": "Waiting selling point validation",
              "color": "#f7981d",
              "isFinalStatus": false,
              "globalStatusCode": "processing"
            },
            "type": "delivery",
            "sellingPoint": {
              "id": 3442,
              "name": "My restaurant",
              "address": {
                "id": 1003,
                "street": "C/ Example, 23",
                "details": "Canada building",
                "city": "City name",
                "province": "Province name",
                "postalCode": "12345",
                "latitude": 41.308166,
                "longitude": 2.019725,
                "googlePlaceId": "xxxxxxxxxxxx",
                "placeName": "C/ Example, 23, City name"
              },
              "phone": "+34600000000",
              "email": "myrestaurant@example.com",
              "logo": "http://mycdn.com/selling-point-logo.jpeg",
              "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
              "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
              "mainImageLarge": "https://example.com/selling-point-main-image-large.png",
              "listImageLarge": "https://example.com/selling-point-list-image-large.png",
              "urlKey": "restaurant-name-city",
              "type": "Italian",
              "timezone": "Europe/Madrid"
            },
            "payments": [
              {
                "id": 5922,
                "amount": 29.9,
                "paymentMethodName": "Credit card",
                "prepaid": true,
                "methodCode": "CREDIT_CARD",
                "status": {
                  "code": "DONE",
                  "name": "Finalizado",
                  "color": "#5AAC44",
                  "callToAction": null
                }
              }
            ],
            "orderLines": [
              {
                "totalAmount": 29.9,
                "unitPrice": 14.95,
                "baseAmount": 27.78,
                "vatAmount": 2.72,
                "vatValue": 10,
                "quantity": 2,
                "comment": "Order line comment",
                "label": "Pizza margherita",
                "type": "PRODUCT",
                "product": {
                  "id": 1221,
                  "externalId": "external_reference"
                },
                "childrenOrderLines": []
              },
              {
                "totalAmount": 0,
                "unitPrice": 0,
                "quantity": 1,
                "comment": "",
                "label": "Shipping costs",
                "type": "DELIVERY",
                "distance": 1.13,
                "childrenOrderLines": []
              }
            ],
            "deliveryAmount": 1,
            "deliveryAddress": {
              "id": 1003,
              "street": "C/ Example, 23",
              "details": "Canada building",
              "city": "City name",
              "province": "Province name",
              "postalCode": "12345",
              "latitude": 41.308166,
              "longitude": 2.019725,
              "googlePlaceId": "xxxxxxxxxxxx",
              "placeName": "C/ Example, 23, City name"
            },
            "deliveries": [
              {
                "id": 1003,
                "deliveryAccountName": "DeliveryCompanyName",
                "deliveryAccountPhone": "600000001",
                "pickupAddress": {
                  "id": 1003,
                  "street": "C/ Example, 23",
                  "details": "Canada building",
                  "city": "City name",
                  "province": "Province name",
                  "postalCode": "12345",
                  "latitude": 41.308166,
                  "longitude": 2.019725,
                  "googlePlaceId": "xxxxxxxxxxxx",
                  "placeName": "C/ Example, 23, City name"
                },
                "deliveryAddress": {
                  "id": 1003,
                  "street": "C/ Example, 23",
                  "details": "Canada building",
                  "city": "City name",
                  "province": "Province name",
                  "postalCode": "12345",
                  "latitude": 41.308166,
                  "longitude": 2.019725,
                  "googlePlaceId": "xxxxxxxxxxxx",
                  "placeName": "C/ Example, 23, City name"
                },
                "pickupAgreedAt": "2017-02-09T12:00:00+0000",
                "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
                "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
                "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
                "deliveryInstructions": null,
                "linearDistance": "1.56",
                "realDistance": "1.97",
                "estimatedDeliveryDuration": "15",
                "forSenderInstructions": null,
                "trackingUrl": "https://example.com/tracking/example",
                "status": {
                  "code": "PICKING",
                  "name": "Picking",
                  "color": "blue",
                  "isFinalStatus": false
                },
                "destinationContactEmail": "jane@example.com",
                "destinationContactName": "Jane",
                "destinationContactPhone": "600000000",
                "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
                "driver": {
                  "id": 1003,
                  "email": "john@example.com",
                  "name": "John",
                  "lastname": "Doe",
                  "image": "https://example.com/assets/images/placeholder_image.jpg",
                  "phone": "+34600000000",
                  "transport": {
                    "code": "SCOOTER",
                    "name": "Scooter"
                  },
                  "lastGeolocation": {
                    "latitude": 41.308166,
                    "longitude": 2.019725,
                    "createdAt": "2018-03-015T12:15:00+0000"
                  }
                },
                "isSelfDelivery": false
              }
            ],
            "dinersNumber": 1,
            "isCancellable": true,
            "createdAt": "2017-10-11T12:30:00+0000",
            "preparationTime": "2017-10-11T13:00:00+0000",
            "isAsap": false,
            "market": {
              "name": "My Restaurant",
              "darkLogo": "http://mycdn.com/darkLogo.jpeg",
              "lightLogo": "http://mycdn.com/lightLogo.jpeg",
              "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
              "squareLogo": "http://mycdn.com/squareLogo.jpeg"
            },
            "posOrderId": "XXXX-XXXX-XXXX",
            "marketOrderId": "ZZZZ-ZZZZ-ZZZZ",
            "marketOrderCode": "XYZ"
          },
          "config": {
            "config_param_1": "config_param_1_value",
            "config_param_2": "config_param_2_value"
          },
          "sellingPointId": 3442
        },
        "properties": {
          "event": {
            "type": "string",
            "example": "new_order"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderResponse"
              }
            ],
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "example": 4912
              },
              "totalAmount": {
                "type": "number",
                "example": 29.9
              },
              "baseAmount": {
                "type": "number",
                "example": 27.18
              },
              "vatAmount": {
                "type": "number",
                "example": 2.72
              },
              "executionTimeLabel": {
                "type": "string",
                "example": "11/10 at 13:10h"
              },
              "executionTime": {
                "type": "string",
                "example": "2017-10-11T13:10:00+0000"
              },
              "comment": {
                "type": "string",
                "example": "Thank you"
              },
              "cancellationComment": {
                "type": "string",
                "example": ""
              },
              "consumer": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 1003
                  },
                  "email": {
                    "type": "string",
                    "example": "john@example.com"
                  },
                  "name": {
                    "type": "string",
                    "example": "John"
                  },
                  "lastname": {
                    "type": "string",
                    "example": "Doe"
                  },
                  "image": {
                    "type": "string",
                    "example": "https://example.com/assets/images/placeholder_image.jpg"
                  },
                  "phone": {
                    "type": "string",
                    "example": "+34600000000"
                  },
                  "posClientId": {
                    "type": "string",
                    "example": "CCCC-CCCC-CCCC"
                  },
                  "marketClientId": {
                    "type": "string",
                    "example": "MMMM-MMMM-MMMM"
                  },
                  "notificationsChannel": {
                    "type": "string",
                    "example": "549d70d0e0851200d11229c16f8d38a8b"
                  }
                }
              },
              "status": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "waiting_sp_validation"
                  },
                  "name": {
                    "type": "string",
                    "example": "Waiting selling point validation"
                  },
                  "color": {
                    "type": "string",
                    "example": "#f7981d"
                  },
                  "isFinalStatus": {
                    "type": "boolean",
                    "example": false
                  },
                  "globalStatusCode": {
                    "type": "string",
                    "example": "processing"
                  }
                }
              },
              "type": {
                "type": "string",
                "example": "delivery"
              },
              "sellingPoint": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 3442
                  },
                  "name": {
                    "type": "string",
                    "example": "My restaurant"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 1003
                      },
                      "street": {
                        "type": "string",
                        "example": "C/ Example, 23"
                      },
                      "details": {
                        "type": "string",
                        "example": "Canada building"
                      },
                      "city": {
                        "type": "string",
                        "example": "City name"
                      },
                      "province": {
                        "type": "string",
                        "example": "Province name"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "12345"
                      },
                      "latitude": {
                        "type": "number",
                        "example": 41.308166
                      },
                      "longitude": {
                        "type": "number",
                        "example": 2.019725
                      },
                      "googlePlaceId": {
                        "type": "string",
                        "example": "xxxxxxxxxxxx"
                      },
                      "placeName": {
                        "type": "string",
                        "example": "C/ Example, 23, City name"
                      }
                    }
                  },
                  "phone": {
                    "type": "string",
                    "example": "+34600000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "myrestaurant@example.com"
                  },
                  "logo": {
                    "type": "string",
                    "example": "http://mycdn.com/selling-point-logo.jpeg"
                  },
                  "mainImage": {
                    "type": "string",
                    "example": "http://mycdn.com/selling-point-main-image.jpeg"
                  },
                  "listImage": {
                    "type": "string",
                    "example": "http://mycdn.com/selling-point-list-image.jpeg"
                  },
                  "mainImageLarge": {
                    "type": "string",
                    "example": "https://example.com/selling-point-main-image-large.png"
                  },
                  "listImageLarge": {
                    "type": "string",
                    "example": "https://example.com/selling-point-list-image-large.png"
                  },
                  "urlKey": {
                    "type": "string",
                    "example": "restaurant-name-city"
                  },
                  "type": {
                    "type": "string",
                    "example": "Italian"
                  },
                  "timezone": {
                    "type": "string",
                    "example": "Europe/Madrid"
                  }
                }
              },
              "payments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 5922
                    },
                    "amount": {
                      "type": "number",
                      "example": 29.9
                    },
                    "paymentMethodName": {
                      "type": "string",
                      "example": "Credit card"
                    },
                    "prepaid": {
                      "type": "boolean",
                      "example": true
                    },
                    "methodCode": {
                      "type": "string",
                      "example": "CREDIT_CARD"
                    },
                    "status": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "DONE"
                        },
                        "name": {
                          "type": "string",
                          "example": "Finalizado"
                        },
                        "color": {
                          "type": "string",
                          "example": "#5AAC44"
                        },
                        "callToAction": {
                          "type": "string",
                          "example": null
                        }
                      }
                    }
                  }
                }
              },
              "orderLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "totalAmount": {
                      "type": "number",
                      "example": 29.9
                    },
                    "unitPrice": {
                      "type": "number",
                      "example": 14.95
                    },
                    "baseAmount": {
                      "type": "number",
                      "example": 27.78
                    },
                    "vatAmount": {
                      "type": "number",
                      "example": 2.72
                    },
                    "vatValue": {
                      "type": "number",
                      "example": 10
                    },
                    "quantity": {
                      "type": "integer",
                      "example": 2
                    },
                    "comment": {
                      "type": "string",
                      "example": "Order line comment"
                    },
                    "label": {
                      "type": "string",
                      "example": "Pizza margherita"
                    },
                    "type": {
                      "type": "string",
                      "example": "PRODUCT"
                    },
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1221
                        },
                        "externalId": {
                          "type": "string",
                          "example": "external_reference"
                        }
                      }
                    },
                    "childrenOrderLines": {
                      "type": "object",
                      "properties": []
                    }
                  }
                }
              },
              "deliveryAmount": {
                "type": "number",
                "example": 1
              },
              "deliveryAddress": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 1003
                  },
                  "street": {
                    "type": "string",
                    "example": "C/ Example, 23"
                  },
                  "details": {
                    "type": "string",
                    "example": "Canada building"
                  },
                  "city": {
                    "type": "string",
                    "example": "City name"
                  },
                  "province": {
                    "type": "string",
                    "example": "Province name"
                  },
                  "postalCode": {
                    "type": "string",
                    "example": "12345"
                  },
                  "latitude": {
                    "type": "number",
                    "example": 41.308166
                  },
                  "longitude": {
                    "type": "number",
                    "example": 2.019725
                  },
                  "googlePlaceId": {
                    "type": "string",
                    "example": "xxxxxxxxxxxx"
                  },
                  "placeName": {
                    "type": "string",
                    "example": "C/ Example, 23, City name"
                  }
                }
              },
              "deliveries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 1003
                    },
                    "deliveryAccountName": {
                      "type": "string",
                      "example": "DeliveryCompanyName"
                    },
                    "deliveryAccountPhone": {
                      "type": "string",
                      "example": "600000001"
                    },
                    "pickupAddress": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1003
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345"
                        },
                        "latitude": {
                          "type": "number",
                          "example": 41.308166
                        },
                        "longitude": {
                          "type": "number",
                          "example": 2.019725
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name"
                        }
                      }
                    },
                    "deliveryAddress": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1003
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345"
                        },
                        "latitude": {
                          "type": "number",
                          "example": 41.308166
                        },
                        "longitude": {
                          "type": "number",
                          "example": 2.019725
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name"
                        }
                      }
                    },
                    "pickupAgreedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:00:00+0000"
                    },
                    "pickupConfirmedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:00:00+0000"
                    },
                    "deliveryAgreedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:15:00+0000"
                    },
                    "deliveryConfirmedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:15:00+0000"
                    },
                    "deliveryInstructions": {
                      "type": "string",
                      "example": null
                    },
                    "linearDistance": {
                      "type": "string",
                      "example": "1.56"
                    },
                    "realDistance": {
                      "type": "string",
                      "example": "1.97"
                    },
                    "estimatedDeliveryDuration": {
                      "type": "string",
                      "example": "15"
                    },
                    "forSenderInstructions": {
                      "type": "string",
                      "example": null
                    },
                    "trackingUrl": {
                      "type": "string",
                      "example": "https://example.com/tracking/example"
                    },
                    "status": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "PICKING"
                        },
                        "name": {
                          "type": "string",
                          "example": "Picking"
                        },
                        "color": {
                          "type": "string",
                          "example": "blue"
                        },
                        "isFinalStatus": {
                          "type": "boolean",
                          "example": false
                        }
                      }
                    },
                    "destinationContactEmail": {
                      "type": "string",
                      "example": "jane@example.com"
                    },
                    "destinationContactName": {
                      "type": "string",
                      "example": "Jane"
                    },
                    "destinationContactPhone": {
                      "type": "string",
                      "example": "600000000"
                    },
                    "route": {
                      "type": "string",
                      "example": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@"
                    },
                    "driver": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1003
                        },
                        "email": {
                          "type": "string",
                          "example": "john@example.com"
                        },
                        "name": {
                          "type": "string",
                          "example": "John"
                        },
                        "lastname": {
                          "type": "string",
                          "example": "Doe"
                        },
                        "image": {
                          "type": "string",
                          "example": "https://example.com/assets/images/placeholder_image.jpg"
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000"
                        },
                        "transport": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "SCOOTER"
                            },
                            "name": {
                              "type": "string",
                              "example": "Scooter"
                            }
                          }
                        },
                        "lastGeolocation": {
                          "type": "object",
                          "properties": {
                            "latitude": {
                              "type": "number",
                              "example": 41.308166
                            },
                            "longitude": {
                              "type": "number",
                              "example": 2.019725
                            },
                            "createdAt": {
                              "type": "string",
                              "example": "2018-03-015T12:15:00+0000"
                            }
                          }
                        }
                      }
                    },
                    "isSelfDelivery": {
                      "type": "boolean",
                      "example": false
                    }
                  }
                }
              },
              "dinersNumber": {
                "type": "integer",
                "example": 1
              },
              "isCancellable": {
                "type": "boolean",
                "example": true
              },
              "createdAt": {
                "type": "string",
                "example": "2017-10-11T12:30:00+0000"
              },
              "preparationTime": {
                "type": "string",
                "example": "2017-10-11T13:00:00+0000"
              },
              "isAsap": {
                "type": "boolean",
                "example": false
              },
              "market": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "My Restaurant"
                  },
                  "darkLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/darkLogo.jpeg"
                  },
                  "lightLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/lightLogo.jpeg"
                  },
                  "horizontalLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/horizontalLogo.jpeg"
                  },
                  "squareLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/squareLogo.jpeg"
                  }
                }
              },
              "posOrderId": {
                "type": "string",
                "example": "XXXX-XXXX-XXXX"
              },
              "marketOrderId": {
                "type": "string",
                "example": "ZZZZ-ZZZZ-ZZZZ"
              },
              "marketOrderCode": {
                "type": "string",
                "example": "XYZ"
              }
            }
          },
          "config": {
            "type": "object",
            "properties": {
              "config_param_1": {
                "type": "string",
                "example": "config_param_1_value"
              },
              "config_param_2": {
                "type": "string",
                "example": "config_param_2_value"
              }
            }
          },
          "sellingPointId": {
            "type": "integer",
            "example": 3442
          }
        }
      },
      "_PosNewOrderStatusNotification": {
        "type": "object",
        "description": "PosNewOrderStatusNotification",
        "example": {
          "event": "order_status_changed",
          "data": {
            "id": 4912,
            "totalAmount": 29.9,
            "baseAmount": 27.18,
            "vatAmount": 2.72,
            "executionTimeLabel": "11/10 at 13:10h",
            "executionTime": "2017-10-11T13:10:00+0000",
            "comment": "Thank you",
            "cancellationComment": "",
            "consumer": {
              "id": 1003,
              "email": "john@example.com",
              "name": "John",
              "lastname": "Doe",
              "image": "https://example.com/assets/images/placeholder_image.jpg",
              "phone": "+34600000000",
              "posClientId": "CCCC-CCCC-CCCC",
              "marketClientId": "MMMM-MMMM-MMMM",
              "notificationsChannel": "549d70d0e0851200d11229c16f8d38a8b"
            },
            "status": {
              "code": "waiting_sp_validation",
              "name": "Waiting selling point validation",
              "color": "#f7981d",
              "isFinalStatus": false,
              "globalStatusCode": "processing"
            },
            "type": "delivery",
            "sellingPoint": {
              "id": 3442,
              "name": "My restaurant",
              "address": {
                "id": 1003,
                "street": "C/ Example, 23",
                "details": "Canada building",
                "city": "City name",
                "province": "Province name",
                "postalCode": "12345",
                "latitude": 41.308166,
                "longitude": 2.019725,
                "googlePlaceId": "xxxxxxxxxxxx",
                "placeName": "C/ Example, 23, City name"
              },
              "phone": "+34600000000",
              "email": "myrestaurant@example.com",
              "logo": "http://mycdn.com/selling-point-logo.jpeg",
              "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
              "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
              "mainImageLarge": "https://example.com/selling-point-main-image-large.png",
              "listImageLarge": "https://example.com/selling-point-list-image-large.png",
              "urlKey": "restaurant-name-city",
              "type": "Italian",
              "timezone": "Europe/Madrid"
            },
            "payments": [
              {
                "id": 5922,
                "amount": 29.9,
                "paymentMethodName": "Credit card",
                "prepaid": true,
                "methodCode": "CREDIT_CARD",
                "status": {
                  "code": "DONE",
                  "name": "Finalizado",
                  "color": "#5AAC44",
                  "callToAction": null
                }
              }
            ],
            "orderLines": [
              {
                "totalAmount": 29.9,
                "unitPrice": 14.95,
                "baseAmount": 27.78,
                "vatAmount": 2.72,
                "vatValue": 10,
                "quantity": 2,
                "comment": "Order line comment",
                "label": "Pizza margherita",
                "type": "PRODUCT",
                "product": {
                  "id": 1221,
                  "externalId": "external_reference"
                },
                "childrenOrderLines": []
              },
              {
                "totalAmount": 0,
                "unitPrice": 0,
                "quantity": 1,
                "comment": "",
                "label": "Shipping costs",
                "type": "DELIVERY",
                "distance": 1.13,
                "childrenOrderLines": []
              }
            ],
            "deliveryAmount": 1,
            "deliveryAddress": {
              "id": 1003,
              "street": "C/ Example, 23",
              "details": "Canada building",
              "city": "City name",
              "province": "Province name",
              "postalCode": "12345",
              "latitude": 41.308166,
              "longitude": 2.019725,
              "googlePlaceId": "xxxxxxxxxxxx",
              "placeName": "C/ Example, 23, City name"
            },
            "deliveries": [
              {
                "id": 1003,
                "deliveryAccountName": "DeliveryCompanyName",
                "deliveryAccountPhone": "600000001",
                "pickupAddress": {
                  "id": 1003,
                  "street": "C/ Example, 23",
                  "details": "Canada building",
                  "city": "City name",
                  "province": "Province name",
                  "postalCode": "12345",
                  "latitude": 41.308166,
                  "longitude": 2.019725,
                  "googlePlaceId": "xxxxxxxxxxxx",
                  "placeName": "C/ Example, 23, City name"
                },
                "deliveryAddress": {
                  "id": 1003,
                  "street": "C/ Example, 23",
                  "details": "Canada building",
                  "city": "City name",
                  "province": "Province name",
                  "postalCode": "12345",
                  "latitude": 41.308166,
                  "longitude": 2.019725,
                  "googlePlaceId": "xxxxxxxxxxxx",
                  "placeName": "C/ Example, 23, City name"
                },
                "pickupAgreedAt": "2017-02-09T12:00:00+0000",
                "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
                "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
                "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
                "deliveryInstructions": null,
                "linearDistance": "1.56",
                "realDistance": "1.97",
                "estimatedDeliveryDuration": "15",
                "forSenderInstructions": null,
                "trackingUrl": "https://example.com/tracking/example",
                "status": {
                  "code": "PICKING",
                  "name": "Picking",
                  "color": "blue",
                  "isFinalStatus": false
                },
                "destinationContactEmail": "jane@example.com",
                "destinationContactName": "Jane",
                "destinationContactPhone": "600000000",
                "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
                "driver": {
                  "id": 1003,
                  "email": "john@example.com",
                  "name": "John",
                  "lastname": "Doe",
                  "image": "https://example.com/assets/images/placeholder_image.jpg",
                  "phone": "+34600000000",
                  "transport": {
                    "code": "SCOOTER",
                    "name": "Scooter"
                  },
                  "lastGeolocation": {
                    "latitude": 41.308166,
                    "longitude": 2.019725,
                    "createdAt": "2018-03-015T12:15:00+0000"
                  }
                },
                "isSelfDelivery": false
              }
            ],
            "dinersNumber": 1,
            "isCancellable": true,
            "createdAt": "2017-10-11T12:30:00+0000",
            "preparationTime": "2017-10-11T13:00:00+0000",
            "isAsap": false,
            "market": {
              "name": "My Restaurant",
              "darkLogo": "http://mycdn.com/darkLogo.jpeg",
              "lightLogo": "http://mycdn.com/lightLogo.jpeg",
              "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
              "squareLogo": "http://mycdn.com/squareLogo.jpeg"
            },
            "posOrderId": "XXXX-XXXX-XXXX",
            "marketOrderId": "ZZZZ-ZZZZ-ZZZZ",
            "marketOrderCode": "XYZ"
          },
          "config": {
            "config_param_1": "config_param_1_value",
            "config_param_2": "config_param_2_value"
          },
          "sellingPointId": 3442
        },
        "properties": {
          "event": {
            "type": "string",
            "example": "order_status_changed"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderResponse"
              }
            ],
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "example": 4912
              },
              "totalAmount": {
                "type": "number",
                "example": 29.9
              },
              "baseAmount": {
                "type": "number",
                "example": 27.18
              },
              "vatAmount": {
                "type": "number",
                "example": 2.72
              },
              "executionTimeLabel": {
                "type": "string",
                "example": "11/10 at 13:10h"
              },
              "executionTime": {
                "type": "string",
                "example": "2017-10-11T13:10:00+0000"
              },
              "comment": {
                "type": "string",
                "example": "Thank you"
              },
              "cancellationComment": {
                "type": "string",
                "example": ""
              },
              "consumer": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 1003
                  },
                  "email": {
                    "type": "string",
                    "example": "john@example.com"
                  },
                  "name": {
                    "type": "string",
                    "example": "John"
                  },
                  "lastname": {
                    "type": "string",
                    "example": "Doe"
                  },
                  "image": {
                    "type": "string",
                    "example": "https://example.com/assets/images/placeholder_image.jpg"
                  },
                  "phone": {
                    "type": "string",
                    "example": "+34600000000"
                  },
                  "posClientId": {
                    "type": "string",
                    "example": "CCCC-CCCC-CCCC"
                  },
                  "marketClientId": {
                    "type": "string",
                    "example": "MMMM-MMMM-MMMM"
                  },
                  "notificationsChannel": {
                    "type": "string",
                    "example": "549d70d0e0851200d11229c16f8d38a8b"
                  }
                }
              },
              "status": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "waiting_sp_validation"
                  },
                  "name": {
                    "type": "string",
                    "example": "Waiting selling point validation"
                  },
                  "color": {
                    "type": "string",
                    "example": "#f7981d"
                  },
                  "isFinalStatus": {
                    "type": "boolean",
                    "example": false
                  },
                  "globalStatusCode": {
                    "type": "string",
                    "example": "processing"
                  }
                }
              },
              "type": {
                "type": "string",
                "example": "delivery"
              },
              "sellingPoint": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 3442
                  },
                  "name": {
                    "type": "string",
                    "example": "My restaurant"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 1003
                      },
                      "street": {
                        "type": "string",
                        "example": "C/ Example, 23"
                      },
                      "details": {
                        "type": "string",
                        "example": "Canada building"
                      },
                      "city": {
                        "type": "string",
                        "example": "City name"
                      },
                      "province": {
                        "type": "string",
                        "example": "Province name"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "12345"
                      },
                      "latitude": {
                        "type": "number",
                        "example": 41.308166
                      },
                      "longitude": {
                        "type": "number",
                        "example": 2.019725
                      },
                      "googlePlaceId": {
                        "type": "string",
                        "example": "xxxxxxxxxxxx"
                      },
                      "placeName": {
                        "type": "string",
                        "example": "C/ Example, 23, City name"
                      }
                    }
                  },
                  "phone": {
                    "type": "string",
                    "example": "+34600000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "myrestaurant@example.com"
                  },
                  "logo": {
                    "type": "string",
                    "example": "http://mycdn.com/selling-point-logo.jpeg"
                  },
                  "mainImage": {
                    "type": "string",
                    "example": "http://mycdn.com/selling-point-main-image.jpeg"
                  },
                  "listImage": {
                    "type": "string",
                    "example": "http://mycdn.com/selling-point-list-image.jpeg"
                  },
                  "mainImageLarge": {
                    "type": "string",
                    "example": "https://example.com/selling-point-main-image-large.png"
                  },
                  "listImageLarge": {
                    "type": "string",
                    "example": "https://example.com/selling-point-list-image-large.png"
                  },
                  "urlKey": {
                    "type": "string",
                    "example": "restaurant-name-city"
                  },
                  "type": {
                    "type": "string",
                    "example": "Italian"
                  },
                  "timezone": {
                    "type": "string",
                    "example": "Europe/Madrid"
                  }
                }
              },
              "payments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 5922
                    },
                    "amount": {
                      "type": "number",
                      "example": 29.9
                    },
                    "paymentMethodName": {
                      "type": "string",
                      "example": "Credit card"
                    },
                    "prepaid": {
                      "type": "boolean",
                      "example": true
                    },
                    "methodCode": {
                      "type": "string",
                      "example": "CREDIT_CARD"
                    },
                    "status": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "DONE"
                        },
                        "name": {
                          "type": "string",
                          "example": "Finalizado"
                        },
                        "color": {
                          "type": "string",
                          "example": "#5AAC44"
                        },
                        "callToAction": {
                          "type": "string",
                          "example": null
                        }
                      }
                    }
                  }
                }
              },
              "orderLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "totalAmount": {
                      "type": "number",
                      "example": 29.9
                    },
                    "unitPrice": {
                      "type": "number",
                      "example": 14.95
                    },
                    "baseAmount": {
                      "type": "number",
                      "example": 27.78
                    },
                    "vatAmount": {
                      "type": "number",
                      "example": 2.72
                    },
                    "vatValue": {
                      "type": "number",
                      "example": 10
                    },
                    "quantity": {
                      "type": "integer",
                      "example": 2
                    },
                    "comment": {
                      "type": "string",
                      "example": "Order line comment"
                    },
                    "label": {
                      "type": "string",
                      "example": "Pizza margherita"
                    },
                    "type": {
                      "type": "string",
                      "example": "PRODUCT"
                    },
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1221
                        },
                        "externalId": {
                          "type": "string",
                          "example": "external_reference"
                        }
                      }
                    },
                    "childrenOrderLines": {
                      "type": "object",
                      "properties": []
                    }
                  }
                }
              },
              "deliveryAmount": {
                "type": "number",
                "example": 1
              },
              "deliveryAddress": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 1003
                  },
                  "street": {
                    "type": "string",
                    "example": "C/ Example, 23"
                  },
                  "details": {
                    "type": "string",
                    "example": "Canada building"
                  },
                  "city": {
                    "type": "string",
                    "example": "City name"
                  },
                  "province": {
                    "type": "string",
                    "example": "Province name"
                  },
                  "postalCode": {
                    "type": "string",
                    "example": "12345"
                  },
                  "latitude": {
                    "type": "number",
                    "example": 41.308166
                  },
                  "longitude": {
                    "type": "number",
                    "example": 2.019725
                  },
                  "googlePlaceId": {
                    "type": "string",
                    "example": "xxxxxxxxxxxx"
                  },
                  "placeName": {
                    "type": "string",
                    "example": "C/ Example, 23, City name"
                  }
                }
              },
              "deliveries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 1003
                    },
                    "deliveryAccountName": {
                      "type": "string",
                      "example": "DeliveryCompanyName"
                    },
                    "deliveryAccountPhone": {
                      "type": "string",
                      "example": "600000001"
                    },
                    "pickupAddress": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1003
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345"
                        },
                        "latitude": {
                          "type": "number",
                          "example": 41.308166
                        },
                        "longitude": {
                          "type": "number",
                          "example": 2.019725
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name"
                        }
                      }
                    },
                    "deliveryAddress": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1003
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345"
                        },
                        "latitude": {
                          "type": "number",
                          "example": 41.308166
                        },
                        "longitude": {
                          "type": "number",
                          "example": 2.019725
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name"
                        }
                      }
                    },
                    "pickupAgreedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:00:00+0000"
                    },
                    "pickupConfirmedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:00:00+0000"
                    },
                    "deliveryAgreedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:15:00+0000"
                    },
                    "deliveryConfirmedAt": {
                      "type": "string",
                      "example": "2017-02-09T12:15:00+0000"
                    },
                    "deliveryInstructions": {
                      "type": "string",
                      "example": null
                    },
                    "linearDistance": {
                      "type": "string",
                      "example": "1.56"
                    },
                    "realDistance": {
                      "type": "string",
                      "example": "1.97"
                    },
                    "estimatedDeliveryDuration": {
                      "type": "string",
                      "example": "15"
                    },
                    "forSenderInstructions": {
                      "type": "string",
                      "example": null
                    },
                    "trackingUrl": {
                      "type": "string",
                      "example": "https://example.com/tracking/example"
                    },
                    "status": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "PICKING"
                        },
                        "name": {
                          "type": "string",
                          "example": "Picking"
                        },
                        "color": {
                          "type": "string",
                          "example": "blue"
                        },
                        "isFinalStatus": {
                          "type": "boolean",
                          "example": false
                        }
                      }
                    },
                    "destinationContactEmail": {
                      "type": "string",
                      "example": "jane@example.com"
                    },
                    "destinationContactName": {
                      "type": "string",
                      "example": "Jane"
                    },
                    "destinationContactPhone": {
                      "type": "string",
                      "example": "600000000"
                    },
                    "route": {
                      "type": "string",
                      "example": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@"
                    },
                    "driver": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1003
                        },
                        "email": {
                          "type": "string",
                          "example": "john@example.com"
                        },
                        "name": {
                          "type": "string",
                          "example": "John"
                        },
                        "lastname": {
                          "type": "string",
                          "example": "Doe"
                        },
                        "image": {
                          "type": "string",
                          "example": "https://example.com/assets/images/placeholder_image.jpg"
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000"
                        },
                        "transport": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "SCOOTER"
                            },
                            "name": {
                              "type": "string",
                              "example": "Scooter"
                            }
                          }
                        },
                        "lastGeolocation": {
                          "type": "object",
                          "properties": {
                            "latitude": {
                              "type": "number",
                              "example": 41.308166
                            },
                            "longitude": {
                              "type": "number",
                              "example": 2.019725
                            },
                            "createdAt": {
                              "type": "string",
                              "example": "2018-03-015T12:15:00+0000"
                            }
                          }
                        }
                      }
                    },
                    "isSelfDelivery": {
                      "type": "boolean",
                      "example": false
                    }
                  }
                }
              },
              "dinersNumber": {
                "type": "integer",
                "example": 1
              },
              "isCancellable": {
                "type": "boolean",
                "example": true
              },
              "createdAt": {
                "type": "string",
                "example": "2017-10-11T12:30:00+0000"
              },
              "preparationTime": {
                "type": "string",
                "example": "2017-10-11T13:00:00+0000"
              },
              "isAsap": {
                "type": "boolean",
                "example": false
              },
              "market": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "My Restaurant"
                  },
                  "darkLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/darkLogo.jpeg"
                  },
                  "lightLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/lightLogo.jpeg"
                  },
                  "horizontalLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/horizontalLogo.jpeg"
                  },
                  "squareLogo": {
                    "type": "string",
                    "example": "http://mycdn.com/squareLogo.jpeg"
                  }
                }
              },
              "posOrderId": {
                "type": "string",
                "example": "XXXX-XXXX-XXXX"
              },
              "marketOrderId": {
                "type": "string",
                "example": "ZZZZ-ZZZZ-ZZZZ"
              },
              "marketOrderCode": {
                "type": "string",
                "example": "XYZ"
              }
            }
          },
          "config": {
            "type": "object",
            "properties": {
              "config_param_1": {
                "type": "string",
                "example": "config_param_1_value"
              },
              "config_param_2": {
                "type": "string",
                "example": "config_param_2_value"
              }
            }
          },
          "sellingPointId": {
            "type": "integer",
            "example": 3442
          }
        }
      },
      "CategoryInput": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "parentExternalId": {
            "type": "string",
            "nullable": true
          },
          "rawPayload": {
            "type": "object",
            "additionalProperties": true,
            "description": "Raw/original payload for future reprocessing."
          }
        },
        "required": [
          "externalId",
          "name"
        ]
      },
      "Category": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CategoryInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "ZoneInput": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "rawPayload": {
            "type": "object",
            "additionalProperties": true,
            "description": "Raw/original payload for future reprocessing."
          }
        },
        "required": [
          "externalId",
          "name",
          "sellingPointId"
        ]
      },
      "Zone": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ZoneInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "TableInput": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "zoneExternalId": {
            "type": "string"
          },
          "seats": {
            "type": "integer",
            "format": "int32"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "rawPayload": {
            "type": "object",
            "additionalProperties": true,
            "description": "Raw/original payload for future reprocessing."
          }
        },
        "required": [
          "externalId",
          "name",
          "zoneExternalId"
        ]
      },
      "Table": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TableInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "TicketInput": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "category": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "resolved"
            ]
          },
          "rawPayload": {
            "type": "object",
            "additionalProperties": true,
            "description": "Raw/original payload for future reprocessing."
          }
        },
        "required": [
          "externalId",
          "sellingPointId",
          "title"
        ]
      },
      "Ticket": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TicketInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "PosReferenceInput": {
        "type": "object",
        "description": "POS reference payload for Data Sync (products, variants, modifiers, menus, sections, etc.)",
        "properties": {
          "referenceKey": {
            "type": "string",
            "description": "Stable POS key for the element (unique per POS account)"
          },
          "referenceType": {
            "type": "string",
            "description": "Type of POS reference being synced",
            "enum": [
              "product",
              "variant",
              "productOption",
              "productOptionCategory",
              "menu",
              "menuSection",
              "discount",
              "fee",
              "unknown"
            ]
          },
          "name": {
            "type": "string"
          },
          "parentReferenceKey": {
            "type": "string",
            "description": "Optional parent reference (e.g., variant -> product, option -> optionCategory)"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code for price, if provided"
          },
          "vatPercent": {
            "type": "number",
            "format": "double"
          },
          "isAvailable": {
            "type": "boolean"
          },
          "rawPayload": {
            "type": "object",
            "additionalProperties": true,
            "description": "Original POS payload used for traceability/reprocessing"
          },
          "translations": {
            "type": "object",
            "description": "Optional translations keyed by ISO language code. Only include non-base languages.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Translated name"
                }
              }
            }
          }
        },
        "required": [
          "referenceKey",
          "referenceType",
          "name"
        ]
      },
      "PosReference": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PosReferenceInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "ItemsAvailabilityItem": {
        "type": "object",
        "description": "Availability item for a product or product option.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal OpenQloud identifier. It can be sent back as items[].id in PATCH.",
            "example": 409969
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Identifier assigned by the consuming POS. When present, it can be sent back as items[].externalId in PATCH without using the internal OpenQloud id.",
            "example": "POS-PRODUCT-123"
          },
          "type": {
            "type": "string",
            "description": "Item type",
            "example": "PRODUCT",
            "enum": [
              "PRODUCT",
              "PRODUCT_OPTION"
            ]
          },
          "available": {
            "type": "boolean",
            "description": "Availability status",
            "example": false
          }
        },
        "required": [
          "id",
          "type",
          "available"
        ]
      },
      "ItemsAvailabilityResponse": {
        "type": "array",
        "description": "Collection of availability items.",
        "items": {
          "$ref": "#/components/schemas/ItemsAvailabilityItem"
        }
      },
      "ItemsAvailabilityPatchRequest": {
        "type": "object",
        "description": "Batch request accepting either internal OpenQloud ids or consuming-POS externalIds. The two modes can be mixed; externalId takes precedence when both are present on one item.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemsAvailabilityPatchItem"
            },
            "minItems": 1
          },
          "sendToChannels": {
            "type": "boolean",
            "description": "When true, propagate the committed availability batch to configured channel webhooks after returning the HTTP response. When false, only the availability data is updated.",
            "example": true
          }
        },
        "required": [
          "items"
        ]
      },
      "ItemsAvailabilityPatchItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal OpenQloud identifier. Use either id or externalId."
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "description": "Identifier assigned by the consuming POS. Preferred for external integrations and treated as external even when it contains only digits."
          },
          "type": {
            "type": "string",
            "enum": [
              "PRODUCT",
              "PRODUCT_OPTION"
            ]
          },
          "available": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "available"
        ],
        "anyOf": [
          {
            "required": [
              "id"
            ]
          },
          {
            "required": [
              "externalId"
            ]
          }
        ]
      },
      "ItemsAvailabilityPatchResponse": {
        "type": "object",
        "description": "Acknowledgement echoing the submitted mutations and effective channel-propagation flag.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemsAvailabilityPatchItem"
            }
          },
          "sendToChannels": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "sendToChannels"
        ]
      }
    }
  },
  "webhooks": {
    "newOrderPosWebhook": {
      "post": {
        "summary": "Order created WebHook",
        "description": "Order notifications are delivered to the HTTP webhook configured for your integration. OpenQloud Core does not currently provide a WebSocket notification channel.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PosNewOrderNotification"
              },
              "example": {
                "event": "new_order",
                "data": {
                  "id": 4912,
                  "totalAmount": 29.9,
                  "baseAmount": 27.18,
                  "vatAmount": 2.72,
                  "executionTimeLabel": "11/10 at 13:10h",
                  "executionTime": "2017-10-11T13:10:00+0000",
                  "comment": "Thank you",
                  "cancellationComment": "",
                  "consumer": {
                    "id": 1003,
                    "email": "john@example.com",
                    "name": "John",
                    "lastname": "Doe",
                    "image": "https://example.com/assets/images/placeholder_image.jpg",
                    "phone": "+34600000000",
                    "posClientId": "CCCC-CCCC-CCCC",
                    "marketClientId": "MMMM-MMMM-MMMM",
                    "notificationsChannel": "549d70d0e0851200d11229c16f8d38a8b"
                  },
                  "status": {
                    "code": "waiting_sp_validation",
                    "name": "Waiting selling point validation",
                    "color": "#f7981d",
                    "isFinalStatus": false,
                    "globalStatusCode": "processing"
                  },
                  "type": "delivery",
                  "sellingPoint": {
                    "id": 3442,
                    "name": "My restaurant",
                    "address": {
                      "id": 1003,
                      "street": "C/ Example, 23",
                      "details": "Canada building",
                      "city": "City name",
                      "province": "Province name",
                      "postalCode": "12345",
                      "latitude": 41.308166,
                      "longitude": 2.019725,
                      "googlePlaceId": "xxxxxxxxxxxx",
                      "placeName": "C/ Example, 23, City name"
                    },
                    "phone": "+34600000000",
                    "email": "myrestaurant@example.com",
                    "logo": "http://mycdn.com/selling-point-logo.jpeg",
                    "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                    "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
                    "mainImageLarge": "https://example.com/selling-point-main-image-large.png",
                    "listImageLarge": "https://example.com/selling-point-list-image-large.png",
                    "urlKey": "restaurant-name-city",
                    "type": "Italian",
                    "timezone": "Europe/Madrid"
                  },
                  "payments": [
                    {
                      "id": 5922,
                      "amount": 29.9,
                      "paymentMethodName": "Credit card",
                      "prepaid": true,
                      "methodCode": "CREDIT_CARD",
                      "status": {
                        "code": "DONE",
                        "name": "Finalizado",
                        "color": "#5AAC44",
                        "callToAction": null
                      }
                    }
                  ],
                  "orderLines": [
                    {
                      "totalAmount": 29.9,
                      "unitPrice": 14.95,
                      "baseAmount": 27.78,
                      "vatAmount": 2.72,
                      "vatValue": 10,
                      "quantity": 2,
                      "comment": "Order line comment",
                      "label": "Pizza margherita",
                      "type": "PRODUCT",
                      "product": {
                        "id": 1221,
                        "externalId": "external_reference"
                      },
                      "childrenOrderLines": []
                    },
                    {
                      "totalAmount": 0,
                      "unitPrice": 0,
                      "quantity": 1,
                      "comment": "",
                      "label": "Shipping costs",
                      "type": "DELIVERY",
                      "distance": 1.13,
                      "childrenOrderLines": []
                    }
                  ],
                  "deliveryAmount": 1,
                  "deliveryAddress": {
                    "id": 1003,
                    "street": "C/ Example, 23",
                    "details": "Canada building",
                    "city": "City name",
                    "province": "Province name",
                    "postalCode": "12345",
                    "latitude": 41.308166,
                    "longitude": 2.019725,
                    "googlePlaceId": "xxxxxxxxxxxx",
                    "placeName": "C/ Example, 23, City name"
                  },
                  "deliveries": [
                    {
                      "id": 1003,
                      "deliveryAccountName": "DeliveryCompanyName",
                      "deliveryAccountPhone": "600000001",
                      "pickupAddress": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": 41.308166,
                        "longitude": 2.019725,
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "deliveryAddress": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": 41.308166,
                        "longitude": 2.019725,
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "pickupAgreedAt": "2017-02-09T12:00:00+0000",
                      "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
                      "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
                      "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
                      "deliveryInstructions": null,
                      "linearDistance": "1.56",
                      "realDistance": "1.97",
                      "estimatedDeliveryDuration": "15",
                      "forSenderInstructions": null,
                      "trackingUrl": "https://example.com/tracking/example",
                      "status": {
                        "code": "PICKING",
                        "name": "Picking",
                        "color": "blue",
                        "isFinalStatus": false
                      },
                      "destinationContactEmail": "jane@example.com",
                      "destinationContactName": "Jane",
                      "destinationContactPhone": "600000000",
                      "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
                      "driver": {
                        "id": 1003,
                        "email": "john@example.com",
                        "name": "John",
                        "lastname": "Doe",
                        "image": "https://example.com/assets/images/placeholder_image.jpg",
                        "phone": "+34600000000",
                        "transport": {
                          "code": "SCOOTER",
                          "name": "Scooter"
                        },
                        "lastGeolocation": {
                          "latitude": 41.308166,
                          "longitude": 2.019725,
                          "createdAt": "2018-03-015T12:15:00+0000"
                        }
                      },
                      "isSelfDelivery": false
                    }
                  ],
                  "dinersNumber": 1,
                  "isCancellable": true,
                  "createdAt": "2017-10-11T12:30:00+0000",
                  "preparationTime": "2017-10-11T13:00:00+0000",
                  "isAsap": false,
                  "market": {
                    "name": "My Restaurant",
                    "darkLogo": "http://mycdn.com/darkLogo.jpeg",
                    "lightLogo": "http://mycdn.com/lightLogo.jpeg",
                    "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
                    "squareLogo": "http://mycdn.com/squareLogo.jpeg"
                  },
                  "posOrderId": "XXXX-XXXX-XXXX",
                  "marketOrderId": "ZZZZ-ZZZZ-ZZZZ",
                  "marketOrderCode": "XYZ"
                },
                "config": {
                  "config_param_1": "config_param_1_value",
                  "config_param_2": "config_param_2_value"
                },
                "sellingPointId": 3442
              }
            }
          }
        },
        "tags": [
          "Orders (Modern POS)"
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    },
    "newOrderStatusPosWebhook": {
      "post": {
        "summary": "Order status changed WebHook",
        "description": "Order notifications are delivered to the HTTP webhook configured for your integration. OpenQloud Core does not currently provide a WebSocket notification channel.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/_PosNewOrderStatusNotification"
              },
              "example": {
                "event": "order_status_changed",
                "data": {
                  "id": 4912,
                  "totalAmount": 29.9,
                  "baseAmount": 27.18,
                  "vatAmount": 2.72,
                  "executionTimeLabel": "11/10 at 13:10h",
                  "executionTime": "2017-10-11T13:10:00+0000",
                  "comment": "Thank you",
                  "cancellationComment": "",
                  "consumer": {
                    "id": 1003,
                    "email": "john@example.com",
                    "name": "John",
                    "lastname": "Doe",
                    "image": "https://example.com/assets/images/placeholder_image.jpg",
                    "phone": "+34600000000",
                    "posClientId": "CCCC-CCCC-CCCC",
                    "marketClientId": "MMMM-MMMM-MMMM",
                    "notificationsChannel": "549d70d0e0851200d11229c16f8d38a8b"
                  },
                  "status": {
                    "code": "waiting_sp_validation",
                    "name": "Waiting selling point validation",
                    "color": "#f7981d",
                    "isFinalStatus": false,
                    "globalStatusCode": "processing"
                  },
                  "type": "delivery",
                  "sellingPoint": {
                    "id": 3442,
                    "name": "My restaurant",
                    "address": {
                      "id": 1003,
                      "street": "C/ Example, 23",
                      "details": "Canada building",
                      "city": "City name",
                      "province": "Province name",
                      "postalCode": "12345",
                      "latitude": 41.308166,
                      "longitude": 2.019725,
                      "googlePlaceId": "xxxxxxxxxxxx",
                      "placeName": "C/ Example, 23, City name"
                    },
                    "phone": "+34600000000",
                    "email": "myrestaurant@example.com",
                    "logo": "http://mycdn.com/selling-point-logo.jpeg",
                    "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                    "listImage": "http://mycdn.com/selling-point-list-image.jpeg",
                    "mainImageLarge": "https://example.com/selling-point-main-image-large.png",
                    "listImageLarge": "https://example.com/selling-point-list-image-large.png",
                    "urlKey": "restaurant-name-city",
                    "type": "Italian",
                    "timezone": "Europe/Madrid"
                  },
                  "payments": [
                    {
                      "id": 5922,
                      "amount": 29.9,
                      "paymentMethodName": "Credit card",
                      "prepaid": true,
                      "methodCode": "CREDIT_CARD",
                      "status": {
                        "code": "DONE",
                        "name": "Finalizado",
                        "color": "#5AAC44",
                        "callToAction": null
                      }
                    }
                  ],
                  "orderLines": [
                    {
                      "totalAmount": 29.9,
                      "unitPrice": 14.95,
                      "baseAmount": 27.78,
                      "vatAmount": 2.72,
                      "vatValue": 10,
                      "quantity": 2,
                      "comment": "Order line comment",
                      "label": "Pizza margherita",
                      "type": "PRODUCT",
                      "product": {
                        "id": 1221,
                        "externalId": "external_reference"
                      },
                      "childrenOrderLines": []
                    },
                    {
                      "totalAmount": 0,
                      "unitPrice": 0,
                      "quantity": 1,
                      "comment": "",
                      "label": "Shipping costs",
                      "type": "DELIVERY",
                      "distance": 1.13,
                      "childrenOrderLines": []
                    }
                  ],
                  "deliveryAmount": 1,
                  "deliveryAddress": {
                    "id": 1003,
                    "street": "C/ Example, 23",
                    "details": "Canada building",
                    "city": "City name",
                    "province": "Province name",
                    "postalCode": "12345",
                    "latitude": 41.308166,
                    "longitude": 2.019725,
                    "googlePlaceId": "xxxxxxxxxxxx",
                    "placeName": "C/ Example, 23, City name"
                  },
                  "deliveries": [
                    {
                      "id": 1003,
                      "deliveryAccountName": "DeliveryCompanyName",
                      "deliveryAccountPhone": "600000001",
                      "pickupAddress": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": 41.308166,
                        "longitude": 2.019725,
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "deliveryAddress": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": 41.308166,
                        "longitude": 2.019725,
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "pickupAgreedAt": "2017-02-09T12:00:00+0000",
                      "pickupConfirmedAt": "2017-02-09T12:00:00+0000",
                      "deliveryAgreedAt": "2017-02-09T12:15:00+0000",
                      "deliveryConfirmedAt": "2017-02-09T12:15:00+0000",
                      "deliveryInstructions": null,
                      "linearDistance": "1.56",
                      "realDistance": "1.97",
                      "estimatedDeliveryDuration": "15",
                      "forSenderInstructions": null,
                      "trackingUrl": "https://example.com/tracking/example",
                      "status": {
                        "code": "PICKING",
                        "name": "Picking",
                        "color": "blue",
                        "isFinalStatus": false
                      },
                      "destinationContactEmail": "jane@example.com",
                      "destinationContactName": "Jane",
                      "destinationContactPhone": "600000000",
                      "route": "c_c{FmniKrBcBnAkA@QCMMg@_BbBoEzEEyD?GCQIKMAKB{DsDiBmBq@_A?EAKCICCtDqFtB}ChCwDPPxCrCj@h@",
                      "driver": {
                        "id": 1003,
                        "email": "john@example.com",
                        "name": "John",
                        "lastname": "Doe",
                        "image": "https://example.com/assets/images/placeholder_image.jpg",
                        "phone": "+34600000000",
                        "transport": {
                          "code": "SCOOTER",
                          "name": "Scooter"
                        },
                        "lastGeolocation": {
                          "latitude": 41.308166,
                          "longitude": 2.019725,
                          "createdAt": "2018-03-015T12:15:00+0000"
                        }
                      },
                      "isSelfDelivery": false
                    }
                  ],
                  "dinersNumber": 1,
                  "isCancellable": true,
                  "createdAt": "2017-10-11T12:30:00+0000",
                  "preparationTime": "2017-10-11T13:00:00+0000",
                  "isAsap": false,
                  "market": {
                    "name": "My Restaurant",
                    "darkLogo": "http://mycdn.com/darkLogo.jpeg",
                    "lightLogo": "http://mycdn.com/lightLogo.jpeg",
                    "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
                    "squareLogo": "http://mycdn.com/squareLogo.jpeg"
                  },
                  "posOrderId": "XXXX-XXXX-XXXX",
                  "marketOrderId": "ZZZZ-ZZZZ-ZZZZ",
                  "marketOrderCode": "XYZ"
                },
                "config": {
                  "config_param_1": "config_param_1_value",
                  "config_param_2": "config_param_2_value"
                },
                "sellingPointId": 3442
              }
            }
          }
        },
        "tags": [
          "Orders (Modern POS)"
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    }
  }
}
