{
  "openapi": "3.0.3",
  "info": {
    "title": "OpenQloud Data Reporting API",
    "version": "1.0.0",
    "description": "Read-only API for analytics, BI, and data integrations. Internally this contract is owned as data-reporting. It exposes normalized Sinqro digital order data with stable pagination and minimized customer data by default. Data reads are filtered by sellingPointId where required; token-to-restaurant authorization is enforced from the authenticated module setup scope.\n\nData contract: responses follow the Sinqro Core domain model. Storage and query serving are backed by ClickHouse, so this API is designed for analytical reads instead of direct load on operational Sinqro Core services.\n\nAvailability by source:\n- Without POS ingestion: Sinqro exposes digital/order-hub orders, marketplaces, order types, totals, payments, logistics data, and order lines when those lines are present in the Sinqro order payload.\n- With POS catalog ingestion: Sinqro can expose product, family/category, layout, and POS reference data imported from the POS and served from ClickHouse.\n- With POS ticket ingestion: Sinqro can expose POS/local sales tickets only if those tickets are ingested into Sinqro. Use /tickets for read-only ticket extraction. If a restaurant's local in-store sales are only available in a POS such as Central Cash and Sinqro is not ingesting those local POS sales, consumers must combine Central Cash local sales with Sinqro digital orders in their own analytics layer.\n\nSinqro does not expose marketplace commissions or net settlement amounts in this API."
  },
  "servers": [
    {
      "url": "https://api.openqloud.com/reporting/v1",
      "description": "Production"
    },
    {
      "url": "https://dev-api.openqloud.com/reporting/v1",
      "description": "Development"
    }
  ],
  "tags": [
    {
      "name": "Scope",
      "description": "Authorized restaurants and reference data"
    },
    {
      "name": "Orders",
      "description": "Digital orders and order detail"
    },
    {
      "name": "Order Lines",
      "description": "Order line level data for product mix and tax analysis"
    },
    {
      "name": "Tickets",
      "description": "POS/local sales tickets ingested into Sinqro"
    },
    {
      "name": "Catalog",
      "description": "Product and family reference data"
    },
    {
      "name": "Layout",
      "description": "POS zones, tables, and technical references"
    }
  ],
  "security": [
    {
      "ServerAccessToken": [],
      "UserAccessToken": []
    }
  ],
  "paths": {
    "/selling-points": {
      "get": {
        "tags": [
          "Scope"
        ],
        "summary": "List authorized selling points",
        "description": "Returns the selling points/restaurants assigned to the authenticated integration in Sinqro Core. Every data endpoint is restricted to this scope. A selling point can be authorized even when a specific ClickHouse dataset is still empty for it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized selling points",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SellingPointListResponse"
                },
                "example": {
                  "meta": {
                    "count": 1,
                    "limit": 100,
                    "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
                    "hasMore": false
                  },
                  "data": [
                    {
                      "id": 3961,
                      "name": "Restaurant - Location 1",
                      "timezone": "Europe/Madrid",
                      "externalRef": "3961"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/markets": {
      "get": {
        "tags": [
          "Scope"
        ],
        "summary": "List markets/platforms",
        "description": "Returns the digital channels/marketplaces present in the authorized scope, for example Glovo, Uber Eats, Just Eat, or own app channels. Without POS ticket ingestion this endpoint reflects Sinqro digital orders, not local in-store POS sales.",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Optional selling point filter. Must be inside the authenticated scope."
          }
        ],
        "responses": {
          "200": {
            "description": "Markets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketListResponse"
                },
                "example": {
                  "data": [
                    {
                      "code": "glovo",
                      "name": "Glovo"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/orders": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "List digital orders",
        "description": "Returns digital orders for analytics extraction from ClickHouse, using the Sinqro Core order model as the external contract. Use date filters and cursor pagination for initial historical loads and incremental synchronization. Without POS ticket ingestion this endpoint contains Sinqro digital/order-hub orders only. It does not include local in-store POS sales unless those tickets are ingested into Sinqro.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/From"
          },
          {
            "$ref": "#/components/parameters/To"
          },
          {
            "$ref": "#/components/parameters/OrderType"
          },
          {
            "$ref": "#/components/parameters/MarketCode"
          },
          {
            "$ref": "#/components/parameters/UpdatedAfter"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Orders page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderListResponse"
                },
                "example": {
                  "meta": {
                    "count": 1,
                    "limit": 100,
                    "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
                    "hasMore": false
                  },
                  "data": [
                    {
                      "id": 88354388,
                      "posOrderId": null,
                      "marketOrderId": "99041",
                      "marketOrderCode": "VLV3CW",
                      "sellingPoint": {
                        "id": 3961,
                        "name": "Restaurant - Location 1",
                        "timezone": "Europe/Madrid",
                        "externalRef": "3961"
                      },
                      "market": {
                        "code": "glovo",
                        "name": "Glovo"
                      },
                      "type": "delivery",
                      "status": "finished",
                      "totalAmount": 24.01,
                      "currency": "EUR",
                      "createdAt": "2026-06-28T11:00:46.000Z",
                      "executionTime": "2026-06-28T11:30:00.000Z",
                      "updatedAt": "2026-06-28T11:05:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/orders/{orderId}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get order detail",
        "description": "Returns a single digital order with normalized fields. Pass includeSourcePayload=true to include the archived source order payload stored in ClickHouse for integrations that need parity with the regular order detail. POS/local ticket fields are only present when that data was ingested or included in the original Sinqro order payload.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Sinqro order identifier."
          },
          {
            "name": "sellingPointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Optional selling point scope to make the lookup stricter."
          },
          {
            "name": "includeSourcePayload",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "When true, includes the archived Sinqro order payload stored in ClickHouse. Use only for order detail reads, not bulk BI extraction."
          }
        ],
        "responses": {
          "200": {
            "description": "Order detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDetailResponse"
                },
                "example": {
                  "data": {
                    "id": 88354388,
                    "posOrderId": null,
                    "marketOrderId": "99041",
                    "marketOrderCode": "VLV3CW",
                    "sellingPoint": {
                      "id": 3961,
                      "name": "Restaurant - Location 1",
                      "timezone": "Europe/Madrid",
                      "externalRef": "3961"
                    },
                    "market": {
                      "code": "glovo",
                      "name": "Glovo"
                    },
                    "type": "delivery",
                    "status": "finished",
                    "totalAmount": 24.01,
                    "currency": "EUR",
                    "createdAt": "2026-06-28T11:00:46.000Z",
                    "executionTime": "2026-06-28T11:30:00.000Z",
                    "updatedAt": "2026-06-28T11:05:00.000Z",
                    "baseAmount": 21.83,
                    "vatAmount": 2.18,
                    "deliveryAmount": 1,
                    "payments": [
                      {
                        "amount": 24.01,
                        "paymentMethodName": "Credit card",
                        "methodCode": "CREDIT_CARD",
                        "prepaid": true
                      }
                    ],
                    "consumer": {
                      "marketClientId": "glovo-client-123",
                      "posClientId": null,
                      "sinqroConsumerId": null
                    },
                    "delivery": {
                      "deliveryAccountName": "Marketplace delivery",
                      "pickupAgreedAt": "2026-06-28T11:20:00.000Z",
                      "pickupConfirmedAt": null,
                      "deliveryAgreedAt": "2026-06-28T11:45:00.000Z",
                      "deliveryConfirmedAt": null,
                      "linearDistance": 1.4,
                      "realDistance": 1.9,
                      "isSelfDelivery": false
                    },
                    "orderLines": [
                      {
                        "orderId": 88354388,
                        "lineId": 1,
                        "parentLineId": null,
                        "type": "PRODUCT",
                        "label": "Product example",
                        "quantity": 2,
                        "unitPrice": 10,
                        "totalAmount": 20,
                        "baseAmount": 18.18,
                        "vatAmount": 1.82,
                        "vatValue": 10,
                        "productId": 1001,
                        "productExternalId": "SKU-1001",
                        "familyId": 12,
                        "familyName": "Main dishes",
                        "createdAt": "2026-06-28T11:00:46.000Z"
                      }
                    ],
                    "sourcePayload": {
                      "order": {
                        "id": 88354388,
                        "marketOrderId": "99041",
                        "marketOrderCode": "VLV3CW",
                        "posOrderId": null,
                        "customerName": "Customer reference"
                      },
                      "orderLines": [
                        {
                          "orderId": 88354388,
                          "lineId": 1,
                          "parentLineId": null,
                          "type": "PRODUCT",
                          "label": "Product example",
                          "quantity": 2,
                          "unitPrice": 10,
                          "totalAmount": 20,
                          "baseAmount": 18.18,
                          "vatAmount": 1.82,
                          "vatValue": 10,
                          "productId": 1001,
                          "productExternalId": "SKU-1001",
                          "familyId": 12,
                          "familyName": "Main dishes",
                          "createdAt": "2026-06-28T11:00:46.000Z"
                        }
                      ],
                      "orderPayments": [
                        {
                          "amount": 24.01,
                          "paymentMethodName": "Credit card",
                          "methodCode": "CREDIT_CARD",
                          "prepaid": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/order-lines": {
      "get": {
        "tags": [
          "Order Lines"
        ],
        "summary": "List order lines",
        "description": "Returns line-level digital order data for product mix, family mix, tax, and delivery-fee analysis. Without POS catalog ingestion, product and family fields are limited to what exists in the Sinqro order payload. With POS catalog ingestion, lines can be enriched with imported product/family references. Each row includes the order summary needed to group by date, selling point, marketplace, order type, and reconciliation identifiers without fetching each order detail separately. Use the same date filters as /orders or use cursor pagination for incremental extraction.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/From"
          },
          {
            "$ref": "#/components/parameters/To"
          },
          {
            "$ref": "#/components/parameters/OrderType"
          },
          {
            "$ref": "#/components/parameters/MarketCode"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Order lines page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderLineListResponse"
                },
                "example": {
                  "meta": {
                    "count": 1,
                    "limit": 100,
                    "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
                    "hasMore": false
                  },
                  "data": [
                    {
                      "orderId": 88354388,
                      "lineId": 1,
                      "parentLineId": null,
                      "type": "PRODUCT",
                      "label": "Product example",
                      "quantity": 2,
                      "unitPrice": 10,
                      "totalAmount": 20,
                      "baseAmount": 18.18,
                      "vatAmount": 1.82,
                      "vatValue": 10,
                      "productId": 1001,
                      "productExternalId": "SKU-1001",
                      "familyId": 12,
                      "familyName": "Main dishes",
                      "createdAt": "2026-06-28T11:00:46.000Z",
                      "order": {
                        "id": 88354388,
                        "posOrderId": null,
                        "marketOrderId": "99041",
                        "marketOrderCode": "VLV3CW",
                        "sellingPoint": {
                          "id": 3961,
                          "name": "Restaurant - Location 1",
                          "timezone": "Europe/Madrid",
                          "externalRef": "3961"
                        },
                        "market": {
                          "code": "glovo",
                          "name": "Glovo"
                        },
                        "type": "delivery",
                        "status": "finished",
                        "totalAmount": 24.01,
                        "currency": "EUR",
                        "createdAt": "2026-06-28T11:00:46.000Z",
                        "executionTime": "2026-06-28T11:30:00.000Z",
                        "updatedAt": "2026-06-28T11:05:00.000Z"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/tickets": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "List POS tickets",
        "description": "Returns POS/local sales tickets ingested into ClickHouse. This endpoint is read-only and does not create, refresh, or live-read tickets from the POS. If POS ticket ingestion is not enabled for the selling point, the endpoint returns an empty page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/From"
          },
          {
            "$ref": "#/components/parameters/To"
          },
          {
            "name": "ticketId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional POS/Sinqro ticket identifier filter."
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Tickets page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketListResponse"
                },
                "example": {
                  "meta": {
                    "count": 1,
                    "limit": 100,
                    "nextCursor": null,
                    "hasMore": false
                  },
                  "data": [
                    {
                      "id": "T-53165",
                      "sellingPointId": 3961,
                      "issuedAt": "2026-06-30T10:00:00.000Z",
                      "businessDate": "2026-06-30",
                      "status": "closed",
                      "channel": "pos",
                      "source": "pos",
                      "totalAmount": 24.2,
                      "netAmount": 22,
                      "currency": "EUR"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/products": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List products",
        "description": "Returns product reference data available in the authorized scope. This is POS catalog data imported into Sinqro and served from ClickHouse. Without POS catalog ingestion, consumers should not treat this endpoint as a complete product master.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Products page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductListResponse"
                },
                "example": {
                  "meta": {
                    "count": 1,
                    "limit": 100,
                    "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
                    "hasMore": false
                  },
                  "data": [
                    {
                      "id": "1001",
                      "externalId": "SKU-1001",
                      "sellingPointId": 3961,
                      "name": "Product example",
                      "familyId": "12",
                      "familyName": "Main dishes",
                      "price": 12.5,
                      "vatValue": 10,
                      "active": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/families": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List product families",
        "description": "Returns product family/category reference data available in the authorized scope. This is POS catalog data imported into Sinqro and served from ClickHouse. Without POS catalog ingestion, consumers should not treat this endpoint as a complete family/category master.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional case-insensitive family/category search text."
          }
        ],
        "responses": {
          "200": {
            "description": "Families page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FamilyListResponse"
                },
                "example": {
                  "meta": {
                    "count": 1,
                    "limit": 100,
                    "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
                    "hasMore": false
                  },
                  "data": [
                    {
                      "id": "12",
                      "externalId": "FAM-12",
                      "sellingPointId": 3961,
                      "name": "Main dishes",
                      "active": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/categories": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List product categories",
        "description": "Alias of /families using POS API naming. Returns product family/category reference data imported from the POS and scoped to the authenticated selling point.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional case-insensitive search text."
          }
        ],
        "responses": {
          "200": {
            "description": "Categories page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FamilyListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/zones": {
      "get": {
        "tags": [
          "Layout"
        ],
        "summary": "List POS zones",
        "description": "Returns POS layout zones imported into ClickHouse for the authenticated selling point. If layout ingestion is not enabled, the endpoint returns an empty page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional case-insensitive search text."
          }
        ],
        "responses": {
          "200": {
            "description": "Zones page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/tables": {
      "get": {
        "tags": [
          "Layout"
        ],
        "summary": "List POS tables",
        "description": "Returns POS layout tables imported into ClickHouse for the authenticated selling point. Optional zoneId filters tables by zone.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional case-insensitive search text."
          },
          {
            "name": "zoneId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional POS zone identifier."
          }
        ],
        "responses": {
          "200": {
            "description": "Tables page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/pos-references": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List POS references",
        "description": "Returns technical POS references imported into ClickHouse for the authenticated selling point. These references are provider-specific and should be treated as mapping data, not a universal master catalog.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SellingPointId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional case-insensitive search text."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional POS reference type filter."
          }
        ],
        "responses": {
          "200": {
            "description": "POS references page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PosReferenceListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ServerAccessToken": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-server-access-token",
        "description": "Server token identifying the integration client."
      },
      "UserAccessToken": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-user-access-token",
        "description": "User/access token scoping the integration to authorized restaurants."
      }
    },
    "parameters": {
      "SellingPointId": {
        "name": "sellingPointId",
        "in": "query",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "Sinqro selling point/restaurant identifier. Must be inside the authenticated scope."
      },
      "From": {
        "name": "from",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "description": "Inclusive start datetime. If only a date is provided by the client, it is interpreted in the selling point timezone."
      },
      "To": {
        "name": "to",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "description": "Exclusive end datetime. If only a date is provided by the client, it is interpreted in the selling point timezone."
      },
      "UpdatedAfter": {
        "name": "updatedAfter",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "description": "Optional incremental synchronization filter."
      },
      "OrderType": {
        "name": "orderType",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "delivery",
            "collection",
            "inside",
            "insitu",
            "reservation"
          ]
        },
        "description": "Filter by Sinqro order type. Use delivery and collection/takeaway for digital channel analysis."
      },
      "MarketCode": {
        "name": "marketCode",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Optional digital platform/channel code."
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5000,
          "default": 1000
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Opaque cursor returned by the previous page."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid credentials",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The authenticated integration is not allowed to access this selling point or resource",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "PageMeta": {
        "type": "object",
        "required": [
          "count",
          "limit",
          "nextCursor",
          "hasMore"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 1000
          },
          "limit": {
            "type": "integer",
            "example": 1000
          },
          "nextCursor": {
            "type": "string",
            "nullable": true,
            "example": "eyJvcmRlcklkIjo0MjI0Mjl9"
          },
          "hasMore": {
            "type": "boolean",
            "example": false
          }
        },
        "additionalProperties": false
      },
      "SellingPointListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SellingPoint"
            }
          }
        },
        "additionalProperties": false,
        "example": {
          "meta": {
            "count": 1,
            "limit": 100,
            "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
            "hasMore": false
          },
          "data": [
            {
              "id": 3961,
              "name": "Restaurant - Location 1",
              "timezone": "Europe/Madrid",
              "externalRef": "3961"
            }
          ]
        }
      },
      "MarketListResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Market"
            }
          }
        },
        "additionalProperties": false,
        "example": {
          "data": [
            {
              "code": "glovo",
              "name": "Glovo"
            }
          ]
        }
      },
      "OrderListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          }
        },
        "additionalProperties": false,
        "example": {
          "meta": {
            "count": 1,
            "limit": 100,
            "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
            "hasMore": false
          },
          "data": [
            {
              "id": 88354388,
              "posOrderId": null,
              "marketOrderId": "99041",
              "marketOrderCode": "VLV3CW",
              "sellingPoint": {
                "id": 3961,
                "name": "Restaurant - Location 1",
                "timezone": "Europe/Madrid",
                "externalRef": "3961"
              },
              "market": {
                "code": "glovo",
                "name": "Glovo"
              },
              "type": "delivery",
              "status": "finished",
              "totalAmount": 24.01,
              "currency": "EUR",
              "createdAt": "2026-06-28T11:00:46.000Z",
              "executionTime": "2026-06-28T11:30:00.000Z",
              "updatedAt": "2026-06-28T11:05:00.000Z"
            }
          ]
        }
      },
      "OrderDetailResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "additionalProperties": false,
        "example": {
          "data": {
            "id": 88354388,
            "posOrderId": null,
            "marketOrderId": "99041",
            "marketOrderCode": "VLV3CW",
            "sellingPoint": {
              "id": 3961,
              "name": "Restaurant - Location 1",
              "timezone": "Europe/Madrid",
              "externalRef": "3961"
            },
            "market": {
              "code": "glovo",
              "name": "Glovo"
            },
            "type": "delivery",
            "status": "finished",
            "totalAmount": 24.01,
            "currency": "EUR",
            "createdAt": "2026-06-28T11:00:46.000Z",
            "executionTime": "2026-06-28T11:30:00.000Z",
            "updatedAt": "2026-06-28T11:05:00.000Z",
            "baseAmount": 21.83,
            "vatAmount": 2.18,
            "deliveryAmount": 1,
            "payments": [
              {
                "amount": 24.01,
                "paymentMethodName": "Credit card",
                "methodCode": "CREDIT_CARD",
                "prepaid": true
              }
            ],
            "consumer": {
              "marketClientId": "glovo-client-123",
              "posClientId": null,
              "sinqroConsumerId": null
            },
            "delivery": {
              "deliveryAccountName": "Marketplace delivery",
              "pickupAgreedAt": "2026-06-28T11:20:00.000Z",
              "pickupConfirmedAt": null,
              "deliveryAgreedAt": "2026-06-28T11:45:00.000Z",
              "deliveryConfirmedAt": null,
              "linearDistance": 1.4,
              "realDistance": 1.9,
              "isSelfDelivery": false
            },
            "orderLines": [
              {
                "orderId": 88354388,
                "lineId": 1,
                "parentLineId": null,
                "type": "PRODUCT",
                "label": "Product example",
                "quantity": 2,
                "unitPrice": 10,
                "totalAmount": 20,
                "baseAmount": 18.18,
                "vatAmount": 1.82,
                "vatValue": 10,
                "productId": 1001,
                "productExternalId": "SKU-1001",
                "familyId": 12,
                "familyName": "Main dishes",
                "createdAt": "2026-06-28T11:00:46.000Z"
              }
            ],
            "sourcePayload": {
              "order": {
                "id": 88354388,
                "marketOrderId": "99041",
                "marketOrderCode": "VLV3CW",
                "posOrderId": null,
                "customerName": "Customer reference"
              },
              "orderLines": [
                {
                  "orderId": 88354388,
                  "lineId": 1,
                  "parentLineId": null,
                  "type": "PRODUCT",
                  "label": "Product example",
                  "quantity": 2,
                  "unitPrice": 10,
                  "totalAmount": 20,
                  "baseAmount": 18.18,
                  "vatAmount": 1.82,
                  "vatValue": 10,
                  "productId": 1001,
                  "productExternalId": "SKU-1001",
                  "familyId": 12,
                  "familyName": "Main dishes",
                  "createdAt": "2026-06-28T11:00:46.000Z"
                }
              ],
              "orderPayments": [
                {
                  "amount": 24.01,
                  "paymentMethodName": "Credit card",
                  "methodCode": "CREDIT_CARD",
                  "prepaid": true
                }
              ]
            }
          }
        }
      },
      "OrderLineListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineWithOrder"
            }
          }
        },
        "additionalProperties": false,
        "example": {
          "meta": {
            "count": 1,
            "limit": 100,
            "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
            "hasMore": false
          },
          "data": [
            {
              "orderId": 88354388,
              "lineId": 1,
              "parentLineId": null,
              "type": "PRODUCT",
              "label": "Product example",
              "quantity": 2,
              "unitPrice": 10,
              "totalAmount": 20,
              "baseAmount": 18.18,
              "vatAmount": 1.82,
              "vatValue": 10,
              "productId": 1001,
              "productExternalId": "SKU-1001",
              "familyId": 12,
              "familyName": "Main dishes",
              "createdAt": "2026-06-28T11:00:46.000Z",
              "order": {
                "id": 88354388,
                "posOrderId": null,
                "marketOrderId": "99041",
                "marketOrderCode": "VLV3CW",
                "sellingPoint": {
                  "id": 3961,
                  "name": "Restaurant - Location 1",
                  "timezone": "Europe/Madrid",
                  "externalRef": "3961"
                },
                "market": {
                  "code": "glovo",
                  "name": "Glovo"
                },
                "type": "delivery",
                "status": "finished",
                "totalAmount": 24.01,
                "currency": "EUR",
                "createdAt": "2026-06-28T11:00:46.000Z",
                "executionTime": "2026-06-28T11:30:00.000Z",
                "updatedAt": "2026-06-28T11:05:00.000Z"
              }
            }
          ]
        }
      },
      "ProductListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          }
        },
        "additionalProperties": false,
        "example": {
          "meta": {
            "count": 1,
            "limit": 100,
            "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
            "hasMore": false
          },
          "data": [
            {
              "id": "1001",
              "externalId": "SKU-1001",
              "sellingPointId": 3961,
              "name": "Product example",
              "familyId": "12",
              "familyName": "Main dishes",
              "price": 12.5,
              "vatValue": 10,
              "active": true
            }
          ]
        }
      },
      "FamilyListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Family"
            }
          }
        },
        "additionalProperties": false,
        "example": {
          "meta": {
            "count": 1,
            "limit": 100,
            "nextCursor": "eyJpZCI6Ijg4MzU0Mzg4In0=",
            "hasMore": false
          },
          "data": [
            {
              "id": "12",
              "externalId": "FAM-12",
              "sellingPointId": 3961,
              "name": "Main dishes",
              "active": true
            }
          ]
        }
      },
      "SellingPoint": {
        "type": "object",
        "required": [
          "id",
          "name",
          "timezone"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 3961
          },
          "name": {
            "type": "string",
            "example": "Restaurant - Location 1"
          },
          "timezone": {
            "type": "string",
            "example": "Europe/Madrid"
          },
          "externalRef": {
            "type": "string",
            "nullable": true,
            "description": "Optional customer or POS reference."
          }
        },
        "additionalProperties": false
      },
      "Market": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "ubereats"
          },
          "name": {
            "type": "string",
            "example": "Uber Eats"
          }
        },
        "additionalProperties": false
      },
      "Order": {
        "type": "object",
        "required": [
          "id",
          "sellingPoint",
          "type",
          "market",
          "totalAmount",
          "currency",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Sinqro order identifier.",
            "example": 422429
          },
          "posOrderId": {
            "type": "string",
            "nullable": true,
            "description": "POS order identifier when available. For Central Cash integrations, do not assume this is a Central Cash ticket ID unless validated with the restaurant's Central Cash export."
          },
          "marketOrderId": {
            "type": "string",
            "nullable": true,
            "example": "99041"
          },
          "marketOrderCode": {
            "type": "string",
            "nullable": true,
            "example": "VLV3CW"
          },
          "sellingPoint": {
            "$ref": "#/components/schemas/SellingPoint"
          },
          "market": {
            "$ref": "#/components/schemas/Market"
          },
          "type": {
            "type": "string",
            "enum": [
              "delivery",
              "collection",
              "inside",
              "insitu",
              "reservation"
            ],
            "example": "delivery"
          },
          "status": {
            "type": "string",
            "example": "accepted"
          },
          "totalAmount": {
            "type": "number",
            "format": "float",
            "example": 58.85
          },
          "baseAmount": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "example": 53.42
          },
          "vatAmount": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "example": 5.43
          },
          "deliveryAmount": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "example": 1
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          },
          "consumer": {
            "$ref": "#/components/schemas/ConsumerReference"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-07-24T04:25:53Z"
          },
          "executionTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "preparationTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "delivery": {
            "$ref": "#/components/schemas/DeliveryInfo"
          },
          "orderLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLine"
            }
          },
          "sourcePayload": {
            "nullable": true,
            "description": "Archived source order payload from ClickHouse. Returned only when includeSourcePayload=true. Shape follows the internal Sinqro order payload and may contain more fields than the normalized reporting contract.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SourceOrderPayload"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "OrderSummary": {
        "type": "object",
        "description": "Order context embedded in flattened analytical rows such as /order-lines.",
        "required": [
          "id",
          "sellingPoint",
          "type",
          "market",
          "totalAmount",
          "currency",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Sinqro order identifier.",
            "example": 422429
          },
          "posOrderId": {
            "type": "string",
            "nullable": true,
            "description": "POS order identifier when available. For Central Cash integrations, do not assume this is a Central Cash ticket ID unless validated with the restaurant's Central Cash export."
          },
          "marketOrderId": {
            "type": "string",
            "nullable": true,
            "example": "99041"
          },
          "marketOrderCode": {
            "type": "string",
            "nullable": true,
            "example": "VLV3CW"
          },
          "sellingPoint": {
            "$ref": "#/components/schemas/SellingPoint"
          },
          "market": {
            "$ref": "#/components/schemas/Market"
          },
          "type": {
            "type": "string",
            "enum": [
              "delivery",
              "collection",
              "inside",
              "insitu",
              "reservation"
            ],
            "example": "delivery"
          },
          "status": {
            "type": "string",
            "example": "accepted"
          },
          "totalAmount": {
            "type": "number",
            "format": "float",
            "example": 58.85
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-07-24T04:25:53Z"
          },
          "executionTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderLineWithOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderLine"
          },
          {
            "type": "object",
            "required": [
              "order"
            ],
            "properties": {
              "order": {
                "$ref": "#/components/schemas/OrderSummary"
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "OrderLine": {
        "type": "object",
        "required": [
          "orderId",
          "lineId",
          "type",
          "label",
          "quantity",
          "totalAmount"
        ],
        "properties": {
          "orderId": {
            "type": "integer",
            "format": "int64",
            "example": 422429
          },
          "lineId": {
            "type": "integer",
            "format": "int64",
            "example": 987654
          },
          "parentLineId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "PRODUCT",
              "MENU",
              "PRODUCT_OPTION",
              "DISCOUNT",
              "DELIVERY",
              "CUSTOM",
              "POS_ITEM"
            ],
            "example": "PRODUCT"
          },
          "label": {
            "type": "string",
            "example": "Pizza Margherita"
          },
          "quantity": {
            "type": "number",
            "format": "float",
            "example": 2
          },
          "unitPrice": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "example": 12.5
          },
          "totalAmount": {
            "type": "number",
            "format": "float",
            "example": 25
          },
          "baseAmount": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "vatAmount": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "vatValue": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "example": 10
          },
          "productId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "productExternalId": {
            "type": "string",
            "nullable": true
          },
          "familyId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "familyName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Payment": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "format": "float",
            "example": 58.85
          },
          "paymentMethodName": {
            "type": "string",
            "nullable": true,
            "example": "Credit card"
          },
          "methodCode": {
            "type": "string",
            "nullable": true,
            "example": "CREDIT_CARD"
          },
          "prepaid": {
            "type": "boolean",
            "nullable": true,
            "example": true
          }
        },
        "additionalProperties": false
      },
      "ConsumerReference": {
        "type": "object",
        "description": "Minimized consumer reference. Personal data is not returned by default.",
        "properties": {
          "marketClientId": {
            "type": "string",
            "nullable": true
          },
          "posClientId": {
            "type": "string",
            "nullable": true
          },
          "sinqroConsumerId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeliveryInfo": {
        "type": "object",
        "nullable": true,
        "properties": {
          "deliveryAccountName": {
            "type": "string",
            "nullable": true
          },
          "pickupAgreedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "pickupConfirmedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveryAgreedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveryConfirmedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "linearDistance": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "realDistance": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "isSelfDelivery": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Product": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sellingPointId",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "1001"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "familyId": {
            "type": "string",
            "nullable": true,
            "example": "12"
          },
          "familyName": {
            "type": "string",
            "nullable": true
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64",
            "example": 3961
          },
          "price": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "example": 12.5
          },
          "vatValue": {
            "type": "number",
            "format": "float",
            "nullable": true,
            "example": 10
          },
          "active": {
            "type": "boolean",
            "example": true
          }
        },
        "additionalProperties": false,
        "example": {
          "id": "1001",
          "externalId": "SKU-1001",
          "sellingPointId": 3961,
          "name": "Product example",
          "familyId": "12",
          "familyName": "Main dishes",
          "price": 12.5,
          "vatValue": 10,
          "active": true
        }
      },
      "Family": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sellingPointId",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "12"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64",
            "example": 3961
          },
          "active": {
            "type": "boolean",
            "example": true
          }
        },
        "additionalProperties": false,
        "example": {
          "id": "12",
          "externalId": "FAM-12",
          "sellingPointId": 3961,
          "name": "Main dishes",
          "active": true
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "example": "ACCESS_DENIED"
              },
              "message": {
                "type": "string",
                "example": "The authenticated integration cannot access this selling point."
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "example": {
          "success": false,
          "error": {
            "code": "ACCESS_DENIED",
            "message": "The authenticated integration cannot access this selling point."
          }
        }
      },
      "SourceOrderPayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "order": {
            "$ref": "#/components/schemas/SourceOrder"
          },
          "orderLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLine"
            }
          },
          "orderPayments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          }
        },
        "example": {
          "order": {
            "id": 88354388,
            "marketOrderId": "99041",
            "marketOrderCode": "VLV3CW",
            "posOrderId": null,
            "customerName": "Customer reference"
          },
          "orderLines": [
            {
              "orderId": 88354388,
              "lineId": 1,
              "parentLineId": null,
              "type": "PRODUCT",
              "label": "Product example",
              "quantity": 2,
              "unitPrice": 10,
              "totalAmount": 20,
              "baseAmount": 18.18,
              "vatAmount": 1.82,
              "vatValue": 10,
              "productId": 1001,
              "productExternalId": "SKU-1001",
              "familyId": 12,
              "familyName": "Main dishes",
              "createdAt": "2026-06-28T11:00:46.000Z"
            }
          ],
          "orderPayments": [
            {
              "amount": 24.01,
              "paymentMethodName": "Credit card",
              "methodCode": "CREDIT_CARD",
              "prepaid": true
            }
          ]
        }
      },
      "SourceOrder": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 88354388
          },
          "marketOrderId": {
            "type": "string",
            "nullable": true,
            "example": "99041"
          },
          "marketOrderCode": {
            "type": "string",
            "nullable": true,
            "example": "VLV3CW"
          },
          "posOrderId": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string",
            "nullable": true,
            "description": "May contain PII depending on the archived source payload."
          }
        }
      },
      "TicketListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Ticket"
            }
          }
        },
        "additionalProperties": false
      },
      "ZoneListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zone"
            }
          }
        },
        "additionalProperties": false
      },
      "TableListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Table"
            }
          }
        },
        "additionalProperties": false
      },
      "PosReferenceListResponse": {
        "type": "object",
        "required": [
          "meta",
          "data"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PosReference"
            }
          }
        },
        "additionalProperties": false
      },
      "Ticket": {
        "type": "object",
        "required": [
          "id",
          "sellingPointId",
          "currency"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "T-53165"
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64",
            "example": 3961
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "businessDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "channel": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "totalAmount": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "netAmount": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "example": "EUR"
          }
        },
        "additionalProperties": false
      },
      "Zone": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sellingPointId"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "saleCenterId": {
            "type": "string",
            "nullable": true
          },
          "saleCenterName": {
            "type": "string",
            "nullable": true
          },
          "style": {
            "type": "string",
            "nullable": true
          },
          "tablesCount": {
            "type": "number",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Table": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sellingPointId",
          "active"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "zoneId": {
            "type": "string",
            "nullable": true
          },
          "zoneName": {
            "type": "string",
            "nullable": true
          },
          "saleCenterId": {
            "type": "string",
            "nullable": true
          },
          "saleLocationName": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PosReference": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sellingPointId"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "sellingPointId": {
            "type": "integer",
            "format": "int64"
          },
          "posId": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}
