{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenQloud Management API",
    "version": "1.0.0",
    "description": "Manage existing authorized restaurants: connections, configuration, validation, actions, catalogues, POS references and mappings, orders, availability and event deliveries. Initial restaurant creation and payment assignment belong to Operator API (/v1/operator-accounts), not Management API. Reading or updating an authorized restaurant is technical management, not commercial onboarding. Each operation retains its documented credentials and access scope. Payment responsibility does not grant operational access."
  },
  "servers": [
    {
      "url": "https://api.openqloud.com"
    }
  ],
  "security": [
    {
      "ServerToken": []
    }
  ],
  "paths": {
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/catalog-references/retire": {
      "post": {
        "operationId": "retireCatalogReference",
        "summary": "Retire a connection-scoped catalog reference",
        "description": "Requires connections.write and catalog.write. Soft retirement fenced by the current revision; stale, missing or already retired references return 409. Reference disappears from active inspection; unrelated connection references, catalog products and stored mappings remain unchanged. A later explicit upload with the retired revision reactivates it.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "referenceKey",
                  "expectedRevision"
                ],
                "properties": {
                  "referenceKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "expectedRevision": {
                    "type": "string",
                    "maxLength": 19,
                    "pattern": "^[1-9][0-9]*$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Retired reference revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogReferenceRetirement"
                }
              }
            }
          },
          "400": {
            "description": "Invalid reference or revision"
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Required capabilities absent or revoked"
          },
          "409": {
            "description": "Current active revision not found"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/catalog-references": {
      "parameters": [
        {
          "name": "sellingPointId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "maxLength": 19,
            "pattern": "^[1-9][0-9]*$"
          }
        },
        {
          "name": "connectionOqid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        }
      ],
      "get": {
        "operationId": "listCatalogReferences",
        "summary": "Inspect connection-scoped catalog references",
        "description": "Requires connections.read and catalog.read. Active stored references, ordered by reference key; private fields excluded. No provider request or import certification.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reference page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogReferencePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination"
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Explicit capabilities missing or revoked"
          }
        }
      },
      "put": {
        "operationId": "ingestCatalogReferences",
        "summary": "Upload connection-scoped catalog references",
        "description": "Requires connections.write and catalog.write. Atomic batch of 1..100 explicit references; duplicate keys rejected. expectedRevision 0 creates only, current nonzero revision updates. Stale revision returns 409 and rolls back the entire batch. This is not automatic provider import, does not change legacy references and does not apply mappings to orders.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "$ref": "#/components/schemas/CatalogReferenceInput"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Committed revisions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogReferenceReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or duplicate references"
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Explicit capabilities missing or revoked"
          },
          "409": {
            "description": "Revision conflict; batch rolled back"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/catalog-mappings": {
      "parameters": [
        {
          "name": "sellingPointId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "maxLength": 19,
            "pattern": "^[1-9][0-9]*$"
          }
        },
        {
          "name": "connectionOqid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "maxLength": 256
          }
        }
      ],
      "get": {
        "operationId": "listCatalogMappings",
        "summary": "Inspect connection-scoped catalog mappings",
        "description": "Requires connections.read and catalog.read on the restaurant. Active mappings only, lexicographic reference-key cursor. Stored links are not proof of provider import, target availability or automatic order translation.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Mapping page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogMappingPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination"
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Explicit read capabilities missing, expired or revoked"
          }
        }
      },
      "put": {
        "operationId": "writeCatalogMapping",
        "summary": "Create or revise a connection catalog mapping",
        "description": "Requires connections.write and catalog.write on the restaurant. Target must be an undeleted product or option in that restaurant. Reference is scoped to connection and restaurant. expectedRevision 0 creates only; current nonzero revision updates or reactivates a retired link. A stale revision conflicts, including identical retries after success: read current state before retrying. This operation stores a link only; it does not import references, contact the POS or alter order translation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CatalogMappingWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogMappingWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid mapping"
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Explicit write capabilities missing, expired or revoked"
          },
          "404": {
            "description": "Target absent or deleted in this restaurant"
          },
          "409": {
            "description": "Expected revision conflicts with current state"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/catalog-mappings/retire": {
      "post": {
        "operationId": "retireCatalogMapping",
        "summary": "Retire a connection catalog mapping",
        "description": "Requires connections.write and catalog.write. Soft retirement keeps the reference identity and advances its revision. Missing, already retired or stale revisions conflict. No provider call or order rewrite occurs.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "referenceKey",
                  "expectedRevision"
                ],
                "properties": {
                  "referenceKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "expectedRevision": {
                    "type": "string",
                    "maxLength": 19,
                    "pattern": "^[1-9][0-9]*$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Retired mapping",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "referenceKey",
                        "revision",
                        "status"
                      ],
                      "properties": {
                        "referenceKey": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "string"
                        },
                        "status": {
                          "const": "revoked"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid reference or revision"
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Explicit write capabilities missing, expired or revoked"
          },
          "409": {
            "description": "Expected revision conflicts with current active state"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/service-zones": {
      "get": {
        "operationId": "listServiceZones",
        "summary": "Inspect explicitly authorized stored service zones",
        "description": "Requires current service-zones.read on this restaurant. Catalog access, software category, provisioning and payment do not confer this permission. Stored zones may contain service locations and operational information, but zone and service-location security codes are excluded. Read-only, lexicographic resource-ID pagination; deleted resources are excluded. This is not a computed coverage or availability result.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized stored service-zone page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "items",
                        "nextCursor"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "oqid",
                              "data"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "oqid": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "data": {
                                "type": "object"
                              }
                            }
                          }
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Service-zone grant missing, expired or revoked"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/orders/{orderId}/history": {
      "get": {
        "operationId": "listOrderHistory",
        "summary": "Inspect explicitly authorized stored order changes",
        "description": "Requires current orders.read on this restaurant. Software category, payment and provisioning do not grant access. Returns stored change entries, not complete order snapshots or webhook delivery information. Ascending event-ID cursor does not promise chronological order. An unknown order and an order outside this restaurant both return an empty page after restaurant authorization. Stored changes may contain personal customer information; use only for authorized purposes.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized stored history page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "items",
                        "nextCursor"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "eventId",
                              "eventType",
                              "occurredAt",
                              "data"
                            ],
                            "properties": {
                              "eventId": {
                                "type": "string"
                              },
                              "eventType": {
                                "type": "string"
                              },
                              "occurredAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "data": {
                                "type": "object"
                              }
                            }
                          }
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid order identity or pagination"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Restaurant order-read grant missing, expired or revoked"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/orders": {
      "get": {
        "operationId": "listOrders",
        "summary": "Inspect explicitly authorized stored restaurant orders",
        "description": "Requires the calling developer account's current orders.read grant. Software category, provisioning and payment do not grant access. Read-only inspection of stored order payloads, which may contain personal customer information; use only for authorized purposes. Ascending numeric order-ID cursor, not an active-order queue. Expired or revoked grants deny the request. This is an additive management contract, not a replacement for existing POS or marketplace order formats.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^([1-9][0-9]*)?$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized stored order page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "items",
                        "nextCursor"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "data"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[1-9][0-9]*$"
                              },
                              "data": {
                                "type": "object"
                              }
                            }
                          }
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid order pagination"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Orders permission missing, expired or revoked, or unknown restaurant"
          }
        }
      }
    },
    "/v1/management/restaurants": {
      "get": {
        "operationId": "listRestaurants",
        "summary": "Discover restaurants with an explicit identity-read grant",
        "description": "Lists only restaurants on which the calling developer account currently has restaurant.read. Software category, customer membership, provisioning and payment do not imply access. Revoked or expired grants are excluded. Returns identifiers only, not order, catalog, configuration or financial data. Ascending numeric-ID cursor; an empty list does not prove that no other capabilities have been delegated.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^([1-9][0-9]*)?$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized restaurant identities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "items",
                        "nextCursor"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "oqid"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[1-9][0-9]*$"
                              },
                              "oqid": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination"
          },
          "401": {
            "description": "Invalid server credential"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/validation": {
      "get": {
        "operationId": "getConnectionValidationState",
        "summary": "Inspect the current connection validation proof",
        "description": "Requires current connections.read on every restaurant linked to the connection. Reports current provider validation only when a succeeded reviewed validation action matches the exact configuration revision, module declarations and owners. Legacy validation flags alone are not proof. An inactive or withdrawn validation definition, changed configuration or transferred module invalidates this reported proof. Connection status is separate: successful validation does not activate it or issue credentials. Returns no hashes, credentials, request identifiers, provider responses or financial data. Unknown and unauthorized connections return the same denial.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current validation state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionValidationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing, expired or revoked read permission for any linked restaurant, unlinked or unknown connection"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/event-subscriptions": {
      "get": {
        "operationId": "listConnectionEventSubscriptions",
        "summary": "Inspect explicit event subscriptions of your connection",
        "description": "Requires a current events.subscribe grant and current ownership of both the recipient connection and its module by the calling developer account. Transferred or unassigned modules deny the read. Returns at most four explicitly saved subscriptions, including disabled ones. deliveryAuthorized reflects current subscription, connection and module status; it does not guarantee that the software category receives that event or has a webhook destination. An empty list does not mean legacy delivery is disabled: absent subscriptions retain compatibility rules. Credentials, URLs, other accounts and inferred commercial recipients are excluded. Revoked or expired grants deny the entire read.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Explicit subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSubscriptionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing current event grant, unlinked restaurant or connection owned by another developer account"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/event-subscriptions/{eventType}": {
      "put": {
        "operationId": "setConnectionEventSubscription",
        "summary": "Enable or disable an explicit connection event subscription",
        "description": "Requires a current events.subscribe grant for this restaurant and current ownership of both the recipient connection and its module by the calling developer account. Transferred or unassigned modules deny subscription changes and block queued delivery. Customer membership, payment and middleware category confer no event authority. Repeated requests replace the same subscription without duplication. Authorization is checked again before delivery; inactive connections or modules do not receive explicitly subscribed events. This controls existing recipient selection and formats only: it does not create a webhook destination or promise new events unsupported by the software integration. Connections without an explicit subscription retain historical compatibility behavior.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "eventType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "new_order",
                "order_status_changed",
                "menu_collection_updated",
                "items_availability_updated"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Explicit subscription saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid event or enabled value"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing current event grant, unlinked restaurant or connection owned by another developer account"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/action-requests": {
      "post": {
        "operationId": "requestConnectionAction",
        "summary": "Queue an idempotent connection action",
        "description": "Requires connections.actions on every linked restaurant and any additional declared capabilities. Reviewed validate_connection actions additionally require connections.write for every linked restaurant and complete configuration. A new validation request clears previous validation and connection-check flags. Provider success may certify only the exact captured configuration revision and ownership; edits, including edit-and-restore, and permission revocation prevent stale certification. Validation does not activate the connection or issue credentials. Prerequisites are rechecked before execution. A successful request response is a durable receipt, not provider success. Repeat the same clientReference and action to retrieve the same receipt; changing the action or restaurant conflicts. Execution requires a configured worker and approved destination; imported definitions remain inactive until reviewed, and real provider adapters must be configured separately.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created or previously recorded receipt; not execution confirmation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionRequestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid action request"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing action authority for any affected restaurant"
          },
          "404": {
            "description": "No active action in this connection's module"
          },
          "409": {
            "description": "Idempotency conflict, unmet prerequisite or invalid action definition"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/action-requests/{requestOqid}": {
      "get": {
        "operationId": "getConnectionActionRequest",
        "summary": "Inspect your own connection action receipt",
        "description": "Requires connections.actions on every restaurant linked to the connection and the same requesting developer account. Unknown or unauthorized receipts return the same denial. Returns status and a sanitized error code, never raw provider results, credentials or execution lease tokens. Execution scheduling is not implied by this read operation.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "requestOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized action receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionReceiptResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Unknown receipt, another requesting account, unlinked connection or missing current action authority"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/actions": {
      "get": {
        "operationId": "listConnectionActions",
        "summary": "Discover the actions declared for this connection's module",
        "description": "Requires connections.read. Lists active module-scoped definitions, reviewed effects and prerequisites only; an inactive module returns an empty page. effect=validate_connection identifies a reviewed provider validation action. Requesting it additionally requires connections.write on every linked restaurant. It does not execute actions or grant permissions.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Action definitions page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionsPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Unlinked connection or missing, expired or revoked connections.read"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections/{connectionOqid}/configuration": {
      "patch": {
        "operationId": "updateConnectionConfiguration",
        "summary": "Update an explicitly authorized connection configuration",
        "description": "Requires connections.write on every restaurant linked to the connection, independently of connections.read. This prevents a grant on one restaurant from modifying a shared connection for another. Values must match the module's declared dynamic fields; unknown fields are rejected. Null clears a value. Secrets are masked in the response. Actual changes to values or providerClientId invalidate previous provider validation and connection checks; no-op patches preserve them. Pending actions that require validation are rechecked before execution. This does not validate against the provider, activate the connection or issue credentials.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigurationPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigurationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, undeclared field or incorrect dynamic value type"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing, expired or revoked connections.write or unlinked connection"
          }
        }
      },
      "get": {
        "operationId": "getConnectionConfiguration",
        "summary": "Read the dynamic configuration form of an authorized connection",
        "description": "Requires connections.read on every restaurant linked to the connection. Shared configuration is not disclosed through a grant on just one restaurant. Declared secrets and credential-like legacy fields have masked values and null defaults. This operation does not grant write or action permissions.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration form",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigurationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Connection not linked or explicit grant missing, expired or revoked"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/connections": {
      "post": {
        "operationId": "createConnection",
        "summary": "Create an inactive connection for your software module",
        "description": "Requires connections.write for the restaurant and an active module owned by the calling developer account. No customer account, payment responsibility or historical middleware registration is required. The connection is inactive, unvalidated, linked only to this restaurant and has no usable API credential. All four event subscriptions are explicitly disabled: creation does not grant events.subscribe or subscribe an owner. Use the dynamic configuration API separately. Provider validation, marketplace identity approval and activation are not implemented by this operation. Reusing clientReference with the same restaurant, module and platform returns the same connection; different input conflicts. Permission is rechecked on retries. Existing historical connections are not deduplicated or modified.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created or previously recorded connection identity, not activation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing, expired or revoked connections.write"
          },
          "404": {
            "description": "Module unavailable, inactive or owned by another developer account"
          },
          "409": {
            "description": "Client reference reused with different input"
          }
        }
      },
      "get": {
        "operationId": "listConnections",
        "summary": "Inspect explicitly authorized connection metadata",
        "description": "Requires connections.read. Returns identifier, platform and status only. Configuration, secrets and token hashes are excluded.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection metadata page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionsPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing, expired or revoked connections.read grant"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}/catalog/{resourceType}": {
      "get": {
        "operationId": "listCatalog",
        "summary": "Inspect an explicitly authorized catalog",
        "description": "Requires catalog.read. Returns active catalog records only, never credentials, payments or customer data. Identifier cursor pagination is lexicographic.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          },
          {
            "name": "resourceType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "product",
                "product_option",
                "product_option_category",
                "menu",
                "menu_section",
                "menu_collection"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid resource type or pagination"
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing, expired or revoked catalog.read grant"
          }
        }
      }
    },
    "/v1/management/restaurants/{sellingPointId}": {
      "get": {
        "operationId": "getRestaurant",
        "summary": "Read an explicitly authorized restaurant identity",
        "description": "Requires restaurant.read for this restaurant. Middleware registration and customer membership are neither required nor sufficient. Returns no credentials, billing information or legacy payload.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized restaurant identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestaurantResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid server credential"
          },
          "403": {
            "description": "Missing, expired or revoked restaurant.read grant; also returned for unknown restaurants to prevent enumeration"
          }
        }
      }
    },
    "/v1/middleware/orders/{orderId}/external-reference": {
      "put": {
        "operationId": "compatibility_registerOrderExternalReference",
        "tags": [
          "Orders"
        ],
        "summary": "Register the middleware's order identifier",
        "description": "The order's recorded middleware registers its identifier after importing the order. Repeating the same mapping returns 200. An identifier already bound to another order returns 409. The source namespace is assigned from authenticated middleware identity, never from request input. This records correlation only: it does not mutate order state, history or webhook events. Ownership is checked against the order snapshot, including after location reassignment.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "externalId"
                ],
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Correlation registered or already present",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "oqid",
                    "externalRef"
                  ],
                  "properties": {
                    "oqid": {
                      "type": "string"
                    },
                    "externalRef": {
                      "type": "object",
                      "required": [
                        "source",
                        "externalId",
                        "localTable"
                      ],
                      "properties": {
                        "source": {
                          "type": "string"
                        },
                        "externalId": {
                          "type": "string"
                        },
                        "localTable": {
                          "type": "string",
                          "const": "orders"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid order identifier or external reference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid middleware credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Order absent or owned by another middleware",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "MAPPING_CONFLICT: external identifier belongs to another order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/orders": {
      "get": {
        "operationId": "compatibility_listOrders",
        "tags": [
          "Orders"
        ],
        "summary": "List every order managed by this middleware",
        "description": "Stable newest-first cursor page across every owned selling point. Use after/before for a bounded snapshot and cursor for the next page.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cursor page of orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "nextCursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid middleware token"
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/order-events": {
      "get": {
        "operationId": "compatibility_listOrderEvents",
        "tags": [
          "Orders"
        ],
        "summary": "Recover the middleware order event stream",
        "description": "Oldest-first append-only feed. Persist nextCursor only after applying the whole page. Re-reading a cursor is safe: consumers deduplicate with eventId.",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque nextCursor from the preceding response"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monotonic event page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid middleware token"
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/webhook-secret/rotate": {
      "post": {
        "operationId": "compatibility_rotateWebhookSecret",
        "tags": [
          "Middleware"
        ],
        "summary": "Rotate the webhook signing secret",
        "description": "Returns the new secret once. Webhook signatures are HMAC-SHA256 over timestamp.deliveryId.rawBody.",
        "responses": {
          "200": {
            "description": "New secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Invalid middleware token"
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/webhook-deliveries": {
      "get": {
        "operationId": "compatibility_listWebhookDeliveries",
        "tags": [
          "Middleware"
        ],
        "summary": "List webhook delivery attempts",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "failed",
                "delivered",
                "skipped"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries owned by this middleware",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Invalid middleware token"
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/webhook-deliveries/{deliveryId}/replay": {
      "post": {
        "operationId": "compatibility_replayWebhookDelivery",
        "tags": [
          "Middleware"
        ],
        "summary": "Replay a failed webhook delivery",
        "parameters": [
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Replay queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown delivery or delivery belongs to another middleware"
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/me": {
      "get": {
        "operationId": "compatibility_getMiddleware",
        "tags": [
          "Middleware"
        ],
        "summary": "The calling middleware",
        "description": "Who OpenQloud recognises behind the token.",
        "responses": {
          "200": {
            "description": "Middleware",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_Middleware"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/integrators": {
      "get": {
        "operationId": "compatibility_listIntegrators",
        "tags": [
          "Connections"
        ],
        "summary": "Integrators available for connections",
        "description": "Active developer accounts (POS vendors, marketplaces, delivery companies) a connection can point to.",
        "responses": {
          "200": {
            "description": "Integrators",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_IntegratorList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/locations": {
      "get": {
        "operationId": "compatibility_listLocations",
        "tags": [
          "Locations"
        ],
        "summary": "Locations managed by this middleware",
        "description": "",
        "responses": {
          "200": {
            "description": "Locations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_EntityList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/locations/{locationOqid}": {
      "get": {
        "operationId": "compatibility_getLocation",
        "tags": [
          "Locations"
        ],
        "summary": "Get a location",
        "description": "",
        "responses": {
          "200": {
            "description": "Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_Entity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "locationOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Location oqid (loc_...)"
          }
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/brands/upsert": {
      "post": {
        "operationId": "compatibility_upsertBrand",
        "tags": [
          "Brands"
        ],
        "summary": "Create or reuse a brand",
        "description": "Send a candidate. If OpenQloud already knows it (by external reference, code or Google place), it returns the existing oqid; otherwise it creates it. Idempotent.",
        "responses": {
          "200": {
            "description": "Brand reused or created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_UpsertResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Compatibility_NamedUpsertRequest"
              }
            }
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/connections": {
      "post": {
        "operationId": "compatibility_createConnection",
        "tags": [
          "Connections"
        ],
        "summary": "Connect a location to an integrator",
        "description": "Creates the connection and returns the integrator's user access token once. If an active connection already links the same location, integrator, platform and market, it is returned without a token (created: false).",
        "responses": {
          "200": {
            "description": "Existing connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ConnectionCreated"
                }
              }
            }
          },
          "201": {
            "description": "Connection created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ConnectionCreated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Location, integrator or market not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Compatibility_ConnectionCreateRequest"
              }
            }
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      },
      "get": {
        "operationId": "compatibility_listConnections",
        "tags": [
          "Connections"
        ],
        "summary": "List connections",
        "description": "Connections created by this middleware.",
        "responses": {
          "200": {
            "description": "Connections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ConnectionList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "locationOqid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only this location"
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pos",
                "market",
                "delivery"
              ]
            },
            "description": "Only this platform"
          }
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/connections/{connectionOqid}": {
      "get": {
        "operationId": "compatibility_getConnection",
        "tags": [
          "Connections"
        ],
        "summary": "Get a connection",
        "description": "",
        "responses": {
          "200": {
            "description": "Connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_Connection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Connection oqid (mst_...)"
          }
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      },
      "patch": {
        "operationId": "compatibility_updateConnection",
        "tags": [
          "Connections"
        ],
        "summary": "Configure, enable or disable a connection",
        "description": "`status: inactive` stops the integrator's token at once and, for market connections, unpublishes the location from that market.",
        "responses": {
          "200": {
            "description": "Connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_Connection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Compatibility_ConnectionUpdateRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Connection oqid (mst_...)"
          }
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/connections/{connectionOqid}/token": {
      "post": {
        "operationId": "compatibility_rotateConnectionToken",
        "tags": [
          "Connections"
        ],
        "summary": "Issue a new integrator token",
        "description": "The previous token stops working immediately.",
        "responses": {
          "200": {
            "description": "New token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ConnectionToken"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Connection oqid (mst_...)"
          }
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/connections/{connectionOqid}/configuration": {
      "get": {
        "operationId": "compatibility_getConnectionConfiguration",
        "tags": [
          "Connections"
        ],
        "summary": "What a connection needs to work and what it has",
        "description": "The fields its module asks for (the form to show in your platform), their current values, the provider client id when the module needs one, and what is still missing.",
        "responses": {
          "200": {
            "description": "Configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ConnectionConfiguration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Connection oqid (mst_...)"
          }
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      },
      "patch": {
        "operationId": "compatibility_updateConnectionConfiguration",
        "tags": [
          "Connections"
        ],
        "summary": "Set the configuration of a connection",
        "description": "Merges the values into the connection and answers the whole configuration again. When nothing required is missing, the connection stops requiring configuration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Compatibility_ConnectionConfigurationPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ConnectionConfiguration"
                }
              }
            }
          },
          "400": {
            "description": "CONFIGURATION_VALUE_INVALID, CONFIGURATION_FIELD_UNKNOWN or CONFIGURATION_PATCH_EMPTY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid middleware token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "CONNECTION_SHARED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionOqid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Connection oqid (mst_...)"
          }
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ]
      }
    },
    "/v1/middleware/user/sellingPoints": {
      "get": {
        "operationId": "compatibility_getAuthenticatedUserSellingPoints",
        "summary": "List selling points managed by this middleware",
        "tags": [
          "Locations"
        ],
        "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"
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getAuthenticatedUserSellingPoints",
        "description": "On the selling points this middleware manages."
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/orders/pending": {
      "get": {
        "operationId": "compatibility_getPendingSellingPointOrders",
        "summary": "List pending orders",
        "tags": [
          "Orders"
        ],
        "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"
          }
        },
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getPendingSellingPointOrders",
        "description": "On the selling points this middleware manages."
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/menus/collectionRaw": {
      "get": {
        "summary": "Get raw menu collection",
        "description": "On the selling points this middleware manages.\n\nReturns 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdMenusCollectionRaw",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdMenusCollectionRaw"
      },
      "patch": {
        "summary": "Patch menu collection",
        "description": "On the selling points this middleware manages.\n\nReplaces 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/Compatibility_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/Compatibility_MenuCollectionRaw"
                },
                "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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_patchSellingPointsBySellingPointIdMenusCollectionRaw",
        "x-openqloud-same-as": "posApp.patchSellingPointsBySellingPointIdMenusCollectionRaw"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/images": {
      "put": {
        "summary": "Upload a selling-point image",
        "description": "On the selling points this middleware manages.\n\nCreates 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 restaurant 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/Compatibility_LegacyImageFile"
                    },
                    "thumbnailFile": {
                      "$ref": "#/components/schemas/Compatibility_LegacyImageFile"
                    },
                    "productGridFile": {
                      "$ref": "#/components/schemas/Compatibility_LegacyImageFile"
                    },
                    "listFile": {
                      "$ref": "#/components/schemas/Compatibility_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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_putSellingPointsBySellingPointIdImages",
        "x-openqloud-same-as": "posApp.putSellingPointsBySellingPointIdImages"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/itemsAvailability": {
      "get": {
        "summary": "Get items availability",
        "description": "On the selling points this middleware manages.\n\nGet 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 restaurant. The PATCH operation on this same path accepts either identifier. Use `externalId` to operate exclusively with restaurant 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Availability"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdItemsAvailability",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdItemsAvailability"
      },
      "patch": {
        "summary": "Patch items availability",
        "description": "On the selling points this middleware manages.\n\nUpdate 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 restaurant. 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/Compatibility_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/Compatibility_ItemsAvailabilityPatchResponse"
                },
                "example": {
                  "items": [
                    {
                      "externalId": "POS-PRODUCT-123",
                      "type": "PRODUCT",
                      "available": false
                    }
                  ],
                  "sendToChannels": true
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                },
                "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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The supplied externalId is not unique for this item type in the selling point.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Availability"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_patchSellingPointsBySellingPointIdItemsAvailability",
        "x-openqloud-same-as": "posApp.patchSellingPointsBySellingPointIdItemsAvailability"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/serviceZones": {
      "patch": {
        "summary": "Patch zones and tables",
        "description": "On the selling points this middleware manages.\n\nCreate and modify the restaurant zones and tables",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Compatibility_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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Service zones"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_patchSellingPointsBySellingPointIdServiceZones",
        "x-openqloud-same-as": "posApp.patchSellingPointsBySellingPointIdServiceZones"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/productsCollection": {
      "put": {
        "summary": "Put products collection",
        "description": "On the selling points this middleware manages.\n\nCore-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 restaurant `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/Compatibility_ProductInputData"
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "products"
                    ],
                    "properties": {
                      "products": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Compatibility_ProductInputData"
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/Compatibility_ProductInputData"
                    }
                  }
                ]
              },
              "example": {
                "products": [
                  {
                    "externalId": "fixture-72"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Complete products saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_Products"
                },
                "example": [
                  {
                    "id": 72,
                    "name": "Imported fixture"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_putSellingPointsBySellingPointIdProductsCollection",
        "x-openqloud-same-as": "posApp.putSellingPointsBySellingPointIdProductsCollection"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/products/rewrite": {
      "patch": {
        "summary": "Rewrite product collection",
        "description": "On the selling points this middleware manages.\n\nCore-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/Compatibility_ProductInputData"
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/Compatibility_ProductInputData"
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "products"
                    ],
                    "properties": {
                      "products": {
                        "oneOf": [
                          {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/Compatibility_ProductInputData"
                            }
                          },
                          {
                            "type": "object",
                            "additionalProperties": {
                              "$ref": "#/components/schemas/Compatibility_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/Compatibility_Products"
                },
                "example": [
                  {
                    "id": 73,
                    "name": "Rewritten fixture"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_patchSellingPointsBySellingPointIdProductsRewrite",
        "x-openqloud-same-as": "posApp.patchSellingPointsBySellingPointIdProductsRewrite"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/products": {
      "get": {
        "summary": "Get products",
        "description": "On the selling points this middleware manages.\n\nReturns 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 restaurant 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdProducts",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdProducts"
      },
      "post": {
        "summary": "Post product",
        "description": "On the selling points this middleware manages.\n\nCreates 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/Compatibility_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/Compatibility_RestaurantProduct"
                },
                "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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_postSellingPointsBySellingPointIdProducts",
        "x-openqloud-same-as": "posApp.postSellingPointsBySellingPointIdProducts"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/products/external/{externalId}": {
      "get": {
        "summary": "Get product using external ID",
        "description": "On the selling points this middleware manages.\n\nReturns all product information using the `externalId` assigned by the consuming restaurant. 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": "compatibility_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/Compatibility_RestaurantProduct"
                },
                "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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No active product has this externalId in the selling point.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The externalId identifies more than one active product in the selling point.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getSellingPointProductByExternalId"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/products/{productId}": {
      "get": {
        "summary": "Get product using OpenQloud ID",
        "description": "On the selling points this middleware manages.\n\nReturns all product information using the internal OpenQloud product ID. For the identifier assigned by the consuming restaurant, 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/Compatibility_RestaurantProduct"
                },
                "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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdProductsByProductId",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdProductsByProductId"
      },
      "patch": {
        "summary": "Patch product",
        "description": "On the selling points this middleware manages.\n\nPartially 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/Compatibility_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/Compatibility_RestaurantProduct"
                },
                "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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_patchSellingPointsBySellingPointIdProductsByProductId",
        "x-openqloud-same-as": "posApp.patchSellingPointsBySellingPointIdProductsByProductId"
      },
      "delete": {
        "summary": "Delete product",
        "description": "On the selling points this middleware manages.\n\nDelete 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/Compatibility_RestaurantErrorResponse"
                },
                "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": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_deleteSellingPointsBySellingPointIdProductsByProductId",
        "x-openqloud-same-as": "posApp.deleteSellingPointsBySellingPointIdProductsByProductId"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/productOptionsCategories": {
      "get": {
        "summary": "Get product option categories",
        "description": "On the selling points this middleware manages.\n\nGet 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdProductOptionsCategories",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdProductOptionsCategories"
      },
      "post": {
        "summary": "Post product options category",
        "description": "On the selling points this middleware manages.\n\nCreate product options category",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Compatibility_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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_postSellingPointsBySellingPointIdProductOptionsCategories",
        "x-openqloud-same-as": "posApp.postSellingPointsBySellingPointIdProductOptionsCategories"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/productOptionsCategories/{productOptionCategoryId}": {
      "get": {
        "summary": "Get product options category",
        "description": "On the selling points this middleware manages.\n\nGet 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryId",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryId"
      },
      "patch": {
        "summary": "Patch product options category",
        "description": "On the selling points this middleware manages.\n\n\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/Compatibility_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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_patchSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryId",
        "x-openqloud-same-as": "posApp.patchSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryId"
      },
      "delete": {
        "summary": "Delete product options category",
        "description": "On the selling points this middleware manages.\n\nDelete 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/Compatibility_RestaurantErrorResponse"
                },
                "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": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_deleteSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryId",
        "x-openqloud-same-as": "posApp.deleteSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryId"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/productOptionsCategories/{productOptionCategoryId}/productOptions/{productOptionId}": {
      "delete": {
        "summary": "Delete product option",
        "description": "On the selling points this middleware manages.\n\nDelete 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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_deleteSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryIdProductOptionsByProductOptionId",
        "x-openqloud-same-as": "posApp.deleteSellingPointsBySellingPointIdProductOptionsCategoriesByProductOptionCategoryIdProductOptionsByProductOptionId"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/menus/collection": {
      "post": {
        "summary": "Post menus",
        "description": "On the selling points this middleware manages.\n\nCreate 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/Compatibility_MenuCollectionInputData"
                  },
                  {
                    "type": "object",
                    "required": [
                      "menus"
                    ],
                    "properties": {
                      "menus": {
                        "$ref": "#/components/schemas/Compatibility_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/Compatibility_RestaurantMenu"
                },
                "example": [
                  {
                    "id": 141,
                    "externalId": "dinner",
                    "name": "Example dinner menu",
                    "type": "menu",
                    "public": true
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_postSellingPointsBySellingPointIdMenusCollection",
        "x-openqloud-same-as": "posApp.postSellingPointsBySellingPointIdMenusCollection"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/menus/{menuId}": {
      "patch": {
        "summary": "Patch menu",
        "description": "On the selling points this middleware manages.\n\nUpdate 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/Compatibility_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/Compatibility_RestaurantMenu"
                },
                "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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_patchSellingPointsBySellingPointIdMenusByMenuId",
        "x-openqloud-same-as": "posApp.patchSellingPointsBySellingPointIdMenusByMenuId"
      },
      "get": {
        "summary": "Get menu",
        "description": "On the selling points this middleware manages.\n\n 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/Compatibility_RestaurantMenu"
                },
                "example": {
                  "id": 141,
                  "externalId": "dinner",
                  "name": "Example dinner menu",
                  "type": "menu",
                  "public": true
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdMenusByMenuId",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdMenusByMenuId"
      },
      "delete": {
        "summary": "Delete menu",
        "description": "On the selling points this middleware manages.\n\nDelete 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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_deleteSellingPointsBySellingPointIdMenusByMenuId",
        "x-openqloud-same-as": "posApp.deleteSellingPointsBySellingPointIdMenusByMenuId"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/menus": {
      "get": {
        "summary": "Get menus",
        "description": "On the selling points this middleware manages.\n\n\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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdMenus",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdMenus"
      }
    },
    "/v1/middleware/orders/{orderId}": {
      "get": {
        "summary": "Get order",
        "description": "On the selling points this middleware manages.\n\nRead an order with its OpenQloud identifier, external references and version. Access is limited to the middleware that owns the order.",
        "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": {
                  "type": "object",
                  "required": [
                    "oqid",
                    "externalRefs",
                    "order",
                    "version"
                  ],
                  "properties": {
                    "oqid": {
                      "type": "string"
                    },
                    "externalRefs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "source",
                          "externalId"
                        ],
                        "properties": {
                          "source": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "order": {
                      "$ref": "#/components/schemas/Compatibility_OrderResponse"
                    },
                    "version": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getOrdersByOrderId",
        "x-openqloud-same-as": "posApp.getOrdersByOrderId"
      }
    },
    "/v1/middleware/orders/{orderId}/actions": {
      "get": {
        "summary": "Get order actions (token)",
        "description": "On the selling points this middleware manages.\n\nGet 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getOrdersByOrderIdActions",
        "x-openqloud-same-as": "posApp.getOrdersByOrderIdActions"
      },
      "post": {
        "summary": "Change order status (using order action token)",
        "description": "On the selling points this middleware manages.\n\nChange 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_postOrdersByOrderIdActions",
        "x-openqloud-same-as": "posApp.postOrdersByOrderIdActions"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/orders/{orderId}/status": {
      "post": {
        "summary": "Change order status (using order status type code)",
        "description": "On the selling points this middleware manages.\n\nChange 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\n\nFor middleware return updates, use a stable Idempotency-Key and the order version in If-Match. Repeating an identical state does not create new history or notifications; stale changed-state updates are rejected. Actual state changes are notified to eligible integrations and the assigned middleware, so a webhook acknowledgement must not be translated into another state change.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Compatibility_NewOrderStatus"
              },
              "example": {
                "orderStatusTypeCode": "accepted",
                "cancellationReason": "",
                "delayMinutes": 10
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_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"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_postSellingPointsBySellingPointIdOrdersByOrderIdStatus",
        "x-openqloud-same-as": "posApp.postSellingPointsBySellingPointIdOrdersByOrderIdStatus"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/orders": {
      "get": {
        "summary": "Get orders",
        "description": "On the selling points this middleware manages.\n\nCursor-paginated orders of a selling point managed by this middleware. Persist nextCursor only after processing the entire page.",
        "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"
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque nextCursor from the preceding page."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "nextCursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "oqid",
                          "externalRefs",
                          "order",
                          "version"
                        ],
                        "properties": {
                          "oqid": {
                            "type": "string"
                          },
                          "externalRefs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "source",
                                "externalId"
                              ],
                              "properties": {
                                "source": {
                                  "type": "string"
                                },
                                "externalId": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "order": {
                            "$ref": "#/components/schemas/Compatibility_OrderResponse"
                          },
                          "version": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error/s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdOrders",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdOrders"
      }
    },
    "/v1/middleware/user/orders/active": {
      "get": {
        "summary": "Get active orders of every selling point you manage",
        "description": "On the selling points this middleware manages.\n\nReturns active orders from every selling point accessible to the authenticated user.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getUserOrdersActive",
        "x-openqloud-same-as": "posApp.getUserOrdersActive"
      }
    },
    "/v1/middleware/sellingPoints/{sellingPointId}/orders/active": {
      "get": {
        "summary": "Get active orders",
        "description": "On the selling points this middleware manages.\n\nGet 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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                },
                "example": {
                  "errors": [
                    {
                      "code": "ERROR_CODE_EXAMPLE",
                      "message": "Error message"
                    }
                  ],
                  "code": "ERROR_CODE_EXAMPLE",
                  "message": "Error message",
                  "httpResponseCode": "400"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "operationId": "compatibility_getSellingPointsBySellingPointIdOrdersActive",
        "x-openqloud-same-as": "posApp.getSellingPointsBySellingPointIdOrdersActive"
      }
    },
    "/v1/middleware/data-sync/external/upload/tickets": {
      "post": {
        "summary": "Create ticket",
        "description": "On the selling points this middleware manages.\n\nCreate 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 restaurant (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/Compatibility_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/Compatibility_Ticket"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_postDataSyncExternalUploadTickets",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.postDataSyncExternalUploadTickets"
      }
    },
    "/v1/middleware/data-sync/external/upload/categories": {
      "post": {
        "summary": "Create category",
        "description": "On the selling points this middleware manages.\n\nCreate a product category.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your restaurant (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/Compatibility_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/Compatibility_Category"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_postDataSyncExternalUploadCategories",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.postDataSyncExternalUploadCategories"
      }
    },
    "/v1/middleware/data-sync/external/upload/zones": {
      "post": {
        "summary": "Create zone",
        "description": "On the selling points this middleware manages.\n\nCreate 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 restaurant (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/Compatibility_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/Compatibility_Zone"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_postDataSyncExternalUploadZones",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.postDataSyncExternalUploadZones"
      }
    },
    "/v1/middleware/data-sync/external/upload/tables": {
      "post": {
        "summary": "Create table",
        "description": "On the selling points this middleware manages.\n\nCreate 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 restaurant (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/Compatibility_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/Compatibility_Table"
                },
                "example": {
                  "ingested": 1
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_postDataSyncExternalUploadTables",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.postDataSyncExternalUploadTables"
      }
    },
    "/v1/middleware/data-sync/external/data/tickets/{restaurantId}": {
      "get": {
        "summary": "List tickets",
        "description": "On the selling points this middleware manages.\n\nList 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 restaurant (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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_getDataSyncExternalDataTicketsByRestaurantId",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getDataSyncExternalDataTicketsByRestaurantId"
      }
    },
    "/v1/middleware/data-sync/external/data/categories/{restaurantId}": {
      "get": {
        "summary": "List categories",
        "description": "On the selling points this middleware manages.\n\nList 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 restaurant (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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_getDataSyncExternalDataCategoriesByRestaurantId",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getDataSyncExternalDataCategoriesByRestaurantId"
      }
    },
    "/v1/middleware/data-sync/external/data/zones/{restaurantId}": {
      "get": {
        "summary": "List zones",
        "description": "On the selling points this middleware manages.\n\nList zones for a restaurant.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your restaurant (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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_getDataSyncExternalDataZonesByRestaurantId",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getDataSyncExternalDataZonesByRestaurantId"
      }
    },
    "/v1/middleware/data-sync/external/data/tables/{restaurantId}": {
      "get": {
        "summary": "List tables",
        "description": "On the selling points this middleware manages.\n\nList tables for a restaurant.\n\nData Sync is for full datasets used by AI, analytics, stock/accounting connectors. Send the complete set from your restaurant (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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_getDataSyncExternalDataTablesByRestaurantId",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getDataSyncExternalDataTablesByRestaurantId"
      }
    },
    "/v1/middleware/data-sync/external/upload/pos-references": {
      "post": {
        "summary": "Create or update POS references",
        "description": "On the selling points this middleware manages.\n\nSync 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 restaurant (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/Compatibility_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/Compatibility_PosReference"
                },
                "example": {
                  "ingested": 2
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_postDataSyncExternalUploadPosReferences",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.postDataSyncExternalUploadPosReferences"
      }
    },
    "/v1/middleware/data-sync/external/data/pos-references/{restaurantId}": {
      "get": {
        "summary": "List POS references",
        "description": "On the selling points this middleware manages.\n\nRead 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 restaurant (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/Compatibility_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/Compatibility_RestaurantErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Restaurant data"
        ],
        "operationId": "compatibility_getDataSyncExternalDataPosReferencesByRestaurantId",
        "security": [
          {
            "Compatibility_MiddlewareServerToken": []
          }
        ],
        "x-openqloud-same-as": "posApp.getDataSyncExternalDataPosReferencesByRestaurantId"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ServerToken": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-server-access-token"
      },
      "Compatibility_MiddlewareServerToken": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-server-access-token",
        "description": "Server token of a developer account registered as a middleware."
      }
    },
    "schemas": {
      "CatalogReferenceRetirement": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "referenceKey",
              "revision",
              "status"
            ],
            "properties": {
              "referenceKey": {
                "type": "string"
              },
              "revision": {
                "type": "string",
                "pattern": "^[1-9][0-9]*$"
              },
              "status": {
                "const": "revoked"
              }
            }
          }
        }
      },
      "CatalogReferenceInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "referenceKey",
          "referenceType",
          "name",
          "expectedRevision"
        ],
        "properties": {
          "referenceKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "referenceType": {
            "enum": [
              "product",
              "variant",
              "productOption",
              "productOptionCategory",
              "menu",
              "menuSection",
              "discount",
              "fee",
              "unknown"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "expectedRevision": {
            "type": "string",
            "maxLength": 19,
            "pattern": "^(0|[1-9][0-9]*)$"
          },
          "parentReferenceKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "vatPercent": {
            "type": "number"
          },
          "isAvailable": {
            "type": "boolean"
          }
        }
      },
      "CatalogReferenceReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "referenceKey",
                    "revision"
                  ],
                  "properties": {
                    "referenceKey": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CatalogReferencePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "items",
              "nextCursor"
            ],
            "properties": {
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "items": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "referenceKey",
                    "referenceType",
                    "revision"
                  ],
                  "properties": {
                    "referenceKey": {
                      "type": "string"
                    },
                    "referenceType": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parentReferenceKey": {
                      "type": "string"
                    },
                    "price": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "vatPercent": {
                      "type": "number"
                    },
                    "isAvailable": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CatalogMappingWrite": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "referenceKey",
          "targetResourceType",
          "targetResourceId",
          "expectedRevision"
        ],
        "properties": {
          "referenceKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "targetResourceType": {
            "enum": [
              "product",
              "product_option"
            ]
          },
          "targetResourceId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "expectedRevision": {
            "type": "string",
            "maxLength": 19,
            "pattern": "^(0|[1-9][0-9]*)$"
          }
        }
      },
      "CatalogMapping": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "referenceKey",
          "targetResourceType",
          "targetResourceId",
          "revision"
        ],
        "properties": {
          "referenceKey": {
            "type": "string"
          },
          "targetResourceType": {
            "enum": [
              "product",
              "product_option"
            ]
          },
          "targetResourceId": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^[1-9][0-9]*$"
          }
        }
      },
      "CatalogMappingPageResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "items",
              "nextCursor"
            ],
            "properties": {
              "items": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "$ref": "#/components/schemas/CatalogMapping"
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "CatalogMappingWriteResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "connectionOqid",
              "sellingPointId",
              "referenceKey",
              "targetResourceType",
              "targetResourceId",
              "revision"
            ],
            "properties": {
              "connectionOqid": {
                "type": "string"
              },
              "sellingPointId": {
                "type": "string"
              },
              "referenceKey": {
                "type": "string"
              },
              "targetResourceType": {
                "enum": [
                  "product",
                  "product_option"
                ]
              },
              "targetResourceId": {
                "type": "string"
              },
              "revision": {
                "type": "string",
                "pattern": "^[1-9][0-9]*$"
              }
            }
          }
        }
      },
      "ConnectionValidationResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "connectionOqid",
              "status",
              "configurationRevision",
              "validated",
              "connected"
            ],
            "properties": {
              "connectionOqid": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "configurationRevision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "validated": {
                "type": "boolean"
              },
              "connected": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ConnectionCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "moduleOqid",
          "platform",
          "clientReference"
        ],
        "properties": {
          "moduleOqid": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "platform": {
            "enum": [
              "pos",
              "market",
              "delivery",
              "middleware"
            ]
          },
          "clientReference": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        }
      },
      "ConnectionCreateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "connectionOqid",
              "created"
            ],
            "properties": {
              "connectionOqid": {
                "type": "string"
              },
              "created": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "EventSubscriptionsResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "maxItems": 4,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "eventType",
                    "enabled",
                    "deliveryAuthorized"
                  ],
                  "properties": {
                    "eventType": {
                      "enum": [
                        "new_order",
                        "order_status_changed",
                        "menu_collection_updated",
                        "items_availability_updated"
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "deliveryAuthorized": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "EventSubscriptionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "EventSubscriptionResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "connectionOqid",
              "sellingPointId",
              "eventType",
              "enabled"
            ],
            "properties": {
              "connectionOqid": {
                "type": "string"
              },
              "sellingPointId": {
                "type": "string",
                "pattern": "^[1-9][0-9]*$"
              },
              "eventType": {
                "enum": [
                  "new_order",
                  "order_status_changed",
                  "menu_collection_updated",
                  "items_availability_updated"
                ]
              },
              "enabled": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ActionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "actionCode",
          "clientReference"
        ],
        "properties": {
          "actionCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 150,
            "pattern": "\\S"
          },
          "clientReference": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "\\S"
          }
        }
      },
      "ActionRequestResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "requestOqid",
              "status",
              "created"
            ],
            "properties": {
              "requestOqid": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "queued",
                  "running",
                  "succeeded",
                  "failed"
                ]
              },
              "created": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ActionReceiptResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "requestOqid",
              "actionCode",
              "status",
              "attempts",
              "errorCode"
            ],
            "properties": {
              "requestOqid": {
                "type": "string"
              },
              "actionCode": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "queued",
                  "running",
                  "succeeded",
                  "failed"
                ]
              },
              "attempts": {
                "type": "integer",
                "minimum": 0
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ActionsPageResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "items",
              "nextCursor"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "code",
                    "title",
                    "effect",
                    "prerequisites"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "effect": {
                      "enum": [
                        "action",
                        "validate_connection"
                      ]
                    },
                    "prerequisites": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "configured",
                        "validated",
                        "connectionActive",
                        "restaurantActive"
                      ],
                      "properties": {
                        "configured": {
                          "type": "boolean"
                        },
                        "validated": {
                          "type": "boolean"
                        },
                        "connectionActive": {
                          "type": "boolean"
                        },
                        "restaurantActive": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ConfigurationPatch": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "values": {
            "type": "object",
            "maxProperties": 100
          },
          "providerClientId": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200
          }
        }
      },
      "ConfigurationResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/Configuration"
          }
        }
      },
      "Configuration": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "connectionOqid",
          "module",
          "fields",
          "providerClientId",
          "externalConfiguration",
          "missing",
          "configured"
        ],
        "properties": {
          "connectionOqid": {
            "type": "string"
          },
          "module": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "oqid": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "label",
                "type",
                "required",
                "value",
                "default"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "text",
                    "number",
                    "integer",
                    "boolean",
                    "select",
                    "secret"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "value": {},
                "default": {},
                "options": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "required": [
                      "value",
                      "label"
                    ],
                    "properties": {
                      "value": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    }
                  }
                },
                "help": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "providerClientId": {
            "type": "object",
            "required": [
              "required",
              "label",
              "value"
            ],
            "properties": {
              "required": {
                "type": "boolean"
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "value": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "externalConfiguration": {
            "type": "object",
            "required": [
              "required",
              "contactEmail"
            ],
            "properties": {
              "required": {
                "type": "boolean"
              },
              "contactEmail": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "configured": {
            "type": "boolean"
          }
        }
      },
      "ConnectionsPageResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "items",
              "nextCursor"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "oqid",
                    "platform",
                    "status"
                  ],
                  "properties": {
                    "oqid": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "CatalogPageResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "items",
              "nextCursor"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "oqid",
                    "data"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "oqid": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "RestaurantResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "oqid"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[1-9][0-9]*$"
              },
              "oqid": {
                "type": "string"
              }
            }
          }
        }
      },
      "Compatibility_EntityStatus": {
        "type": "string",
        "enum": [
          "active",
          "inactive",
          "demo",
          "draft"
        ]
      },
      "Compatibility_ExternalRef": {
        "type": "object",
        "required": [
          "source",
          "externalId"
        ],
        "properties": {
          "source": {
            "type": "string",
            "description": "External system namespace assigned by the middleware, e.g. `erp` or `pos`."
          },
          "externalId": {
            "type": "string"
          },
          "localTable": {
            "type": [
              "string",
              "null"
            ],
            "description": "Namespace inside the source."
          }
        }
      },
      "Compatibility_NamedUpsertRequest": {
        "type": "object",
        "required": [
          "displayName"
        ],
        "properties": {
          "displayName": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "$ref": "#/components/schemas/Compatibility_EntityStatus"
          },
          "externalRefs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Compatibility_ExternalRef"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "Compatibility_Entity": {
        "type": "object",
        "required": [
          "oqid",
          "entityType",
          "status",
          "displayName",
          "externalRefs",
          "data",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "oqid": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "location",
              "brand",
              "marketplace",
              "delivery_company"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/Compatibility_EntityStatus"
          },
          "displayName": {
            "type": "string"
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalRefs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Compatibility_ExternalRef"
            }
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "For locations: sellingPointId (the id used by the POS App and Market Platform APIs), brandOqid, address, timezone, websiteUrl."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Compatibility_EntityList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Compatibility_Entity"
        }
      },
      "Compatibility_UpsertResponse": {
        "type": "object",
        "required": [
          "ok",
          "created",
          "oqid",
          "entityType",
          "displayName",
          "matchedBy",
          "entity"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "created": {
            "type": "boolean"
          },
          "oqid": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "matchedBy": {
            "type": "string",
            "enum": [
              "created",
              "external_ref",
              "code",
              "google_place_id"
            ]
          },
          "entity": {
            "$ref": "#/components/schemas/Compatibility_Entity"
          }
        }
      },
      "Compatibility_Middleware": {
        "type": "object",
        "required": [
          "oqid",
          "name",
          "status"
        ],
        "properties": {
          "oqid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      },
      "Compatibility_Integrator": {
        "type": "object",
        "required": [
          "oqid",
          "name"
        ],
        "properties": {
          "oqid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "Compatibility_IntegratorList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Compatibility_Integrator"
        }
      },
      "Compatibility_ConnectionCreateRequest": {
        "type": "object",
        "required": [
          "locationOqid",
          "integratorOqid",
          "platform"
        ],
        "properties": {
          "locationOqid": {
            "type": "string"
          },
          "integratorOqid": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "pos",
              "market",
              "delivery"
            ]
          },
          "marketCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required for platform market."
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "config": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "moduleOqid": {
            "type": [
              "string",
              "null"
            ],
            "description": "The integrator's module to run (mod_...). Needed when the integrator has several; it decides the configuration form."
          }
        }
      },
      "Compatibility_ConnectionUpdateRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "config": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        }
      },
      "Compatibility_Connection": {
        "type": "object",
        "required": [
          "oqid",
          "platform",
          "status",
          "locationOqid",
          "sellingPointId",
          "integratorOqid",
          "createdAt"
        ],
        "properties": {
          "oqid": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "pos",
              "market",
              "delivery"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "locationOqid": {
            "type": "string"
          },
          "sellingPointId": {
            "type": "integer"
          },
          "integratorOqid": {
            "type": "string"
          },
          "marketCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "config": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Compatibility_ConnectionList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Compatibility_Connection"
        }
      },
      "Compatibility_ConnectionCreated": {
        "type": "object",
        "required": [
          "ok",
          "created",
          "connection"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "created": {
            "type": "boolean"
          },
          "connection": {
            "$ref": "#/components/schemas/Compatibility_Connection"
          },
          "userAccessToken": {
            "type": "string",
            "description": "Only when created: true. Shown once."
          }
        }
      },
      "Compatibility_ConnectionToken": {
        "type": "object",
        "required": [
          "ok",
          "connectionOqid",
          "userAccessToken"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "connectionOqid": {
            "type": "string"
          },
          "userAccessToken": {
            "type": "string"
          }
        }
      },
      "Compatibility_ErrorResponse": {
        "type": "object",
        "required": [
          "code",
          "message",
          "httpResponseCode"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "httpResponseCode": {
            "type": "string"
          }
        }
      },
      "Compatibility_ConnectionConfigurationField": {
        "type": "object",
        "required": [
          "key",
          "label",
          "type",
          "required"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "Name of the value in values"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "integer",
              "boolean",
              "select",
              "secret"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "description": "Value used when none is set"
          },
          "options": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            }
          },
          "help": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "description": "Current value. Secrets come back as ******** when set, never in clear."
          }
        }
      },
      "Compatibility_ConnectionConfiguration": {
        "type": "object",
        "required": [
          "connectionOqid",
          "fields",
          "providerClientId",
          "missing",
          "configured"
        ],
        "properties": {
          "connectionOqid": {
            "type": "string"
          },
          "module": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "oqid": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "description": "The integrator's module this connection runs. null when it cannot be told: pass moduleOqid when creating the connection."
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Compatibility_ConnectionConfigurationField"
            }
          },
          "providerClientId": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the integrator calls it, e.g. «Store ID»"
              },
              "value": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "The restaurant's id in the integrator's system, when its module needs it."
          },
          "externalConfiguration": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "contactEmail": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "The integrator finishes the setup on its side; write to this address."
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Required keys without a value (providerClientId included)"
          },
          "configured": {
            "type": "boolean",
            "description": "Nothing required is missing. The connection's requiresConfiguration is its opposite."
          }
        }
      },
      "Compatibility_ConnectionConfigurationPatch": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "values": {
            "type": "object",
            "additionalProperties": true,
            "description": "Keys of fields to set. null clears one; keys left out keep their value."
          },
          "providerClientId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Compatibility_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
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_errors": {
        "type": "array",
        "description": "Errors",
        "example": [
          {
            "code": "ERROR_CODE_EXAMPLE",
            "message": "Error message"
          }
        ],
        "items": {
          "$ref": "#/components/schemas/Compatibility_Error"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_RestaurantErrorResponse": {
        "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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_MenuCollectionRaw": {
        "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"
            }
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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
                    }
                  }
                }
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_PartialProduct": {
        "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/Compatibility_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"
                }
              }
            }
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_PartialProduct"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_LegacyPriceInput"
          },
          "inMenuPrice": {
            "$ref": "#/components/schemas/Compatibility_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"
                }
              }
            }
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_RestaurantProduct": {
        "type": "object",
        "description": "",
        "example": [],
        "properties": [],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
                  }
                ]
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_ProductOption"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_ProductOptionsCategory"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
                    }
                  }
                }
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_RestaurantMenu": {
        "type": "object",
        "description": "",
        "example": [],
        "properties": [],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
                }
              }
            }
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_allowedOrderTypes": {
        "type": "array",
        "description": "Menu allowed order types code. More info in 'Understanding order types' section.",
        "example": [
          null
        ],
        "items": {
          "type": "string",
          "example": "string"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Partial_Menu"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_PaymentStatus"
          }
        },
        "required": [
          "id",
          "amount",
          "paymentMethodName"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Payment"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_Coupon": {
        "type": "object",
        "description": "Only for orderLine type DISCOUNT",
        "example": {
          "code": "first10"
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Coupon code",
            "example": "string"
          }
        },
        "required": [
          "code"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Product"
          },
          "menu": {
            "$ref": "#/components/schemas/Compatibility_Menu"
          },
          "productOption": {
            "$ref": "#/components/schemas/Compatibility_ProductOption"
          },
          "discount": {
            "$ref": "#/components/schemas/Compatibility_Discount"
          },
          "coupon": {
            "$ref": "#/components/schemas/Compatibility_Coupon"
          },
          "childrenOrderLines": {
            "$ref": "#/components/schemas/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_OrderLine"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_TransportType"
          },
          "lastGeolocation": {
            "$ref": "#/components/schemas/Compatibility_Geolocation"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "lastname",
          "phone",
          "transport"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Address"
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/Compatibility_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/Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Delivery"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_OrderResponse": {
        "description": "Polymorphic order response. The `type` field selects exactly one of the five supported order shapes.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/Compatibility_DeliveryOrder"
          },
          {
            "$ref": "#/components/schemas/Compatibility_CollectionOrder"
          },
          {
            "$ref": "#/components/schemas/Compatibility_InsituOrder"
          },
          {
            "$ref": "#/components/schemas/Compatibility_ReservationOrder"
          },
          {
            "$ref": "#/components/schemas/Compatibility_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"
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "collection",
                "description": "Collection order discriminator"
              }
            },
            "required": [
              "type"
            ]
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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/Compatibility_Delivery_address"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "deliveries": {
                "$ref": "#/components/schemas/Compatibility_deliveries"
              }
            },
            "required": [
              "type",
              "deliveryAmount",
              "deliveryAddress",
              "deliveries"
            ]
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "insitu",
                "description": "Insitu order discriminator"
              },
              "dinersNumber": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of diners"
              }
            },
            "required": [
              "type",
              "dinersNumber"
            ]
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Order"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "reservation",
                "description": "Reservation order discriminator"
              },
              "dinersNumber": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of diners"
              }
            },
            "required": [
              "type",
              "dinersNumber"
            ]
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
            ]
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_Consumer"
          },
          "status": {
            "$ref": "#/components/schemas/Compatibility_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/Compatibility_SellingPoint"
          },
          "payments": {
            "$ref": "#/components/schemas/Compatibility_payments"
          },
          "orderLines": {
            "$ref": "#/components/schemas/Compatibility_orderLines"
          },
          "deliveryAmount": {
            "type": "number",
            "format": "float",
            "description": "Delivery amount. Only for delivery orders.",
            "example": 0
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/Compatibility_Delivery_address"
          },
          "deliveries": {
            "$ref": "#/components/schemas/Compatibility_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/Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_OrderAction"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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
          }
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_OrderResponse"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_Category": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Compatibility_CategoryInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_Zone": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Compatibility_ZoneInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_Table": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Compatibility_TableInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_Ticket": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Compatibility_TicketInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_PosReference": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Compatibility_PosReferenceInput"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_ItemsAvailabilityResponse": {
        "type": "array",
        "description": "Collection of availability items.",
        "items": {
          "$ref": "#/components/schemas/Compatibility_ItemsAvailabilityItem"
        },
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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/Compatibility_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"
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_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"
            ]
          }
        ],
        "x-openqloud-generated": "pos-app"
      },
      "Compatibility_ItemsAvailabilityPatchResponse": {
        "type": "object",
        "description": "Acknowledgement echoing the submitted mutations and effective channel-propagation flag.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Compatibility_ItemsAvailabilityPatchItem"
            }
          },
          "sendToChannels": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "sendToChannels"
        ],
        "x-openqloud-generated": "pos-app"
      }
    }
  },
  "tags": [
    {
      "name": "Middleware"
    },
    {
      "name": "Locations"
    },
    {
      "name": "Brands"
    },
    {
      "name": "Connections"
    },
    {
      "name": "Orders",
      "description": "Follow orders, accept or reject them and move them through their statuses.",
      "x-openqloud-generated": "middleware-services"
    },
    {
      "name": "Availability",
      "description": "Switch products and options on or off in every channel at once.",
      "x-openqloud-generated": "middleware-services"
    },
    {
      "name": "Service zones",
      "description": "Tables, terraces and bars where orders are served.",
      "x-openqloud-generated": "middleware-services"
    },
    {
      "name": "Restaurant data",
      "description": "Send and read the restaurant's own records: tickets, categories, zones, tables and POS references.",
      "x-openqloud-generated": "middleware-services"
    },
    {
      "name": "Menu",
      "description": "Products, options and menus of each restaurant.",
      "x-openqloud-generated": "middleware-services"
    }
  ]
}
