{
  "info": {
    "name": "Takeat V1 — Salão e mesas",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "ESTR-1225. Ten read-only GET operations over existing legacy data and events. No migration or reservation write bridge. Obtain the integration access token separately; no credentials are stored in this collection. SSE has no replay."
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://public-api.takeat.app",
      "type": "string"
    },
    {
      "key": "restaurant_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "table_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "reservation_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "access_token",
      "value": "",
      "type": "string"
    },
    {
      "key": "start_date",
      "value": "",
      "type": "string"
    },
    {
      "key": "end_date",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Consultar mesas",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/tables?restaurant_id={{restaurant_id}}",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: listSalonTables. Required scope: tables:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Histórico consolidado de mesas",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/tables/history?restaurant_id={{restaurant_id}}&start_date={{start_date}}&end_date={{end_date}}&limit=50",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: listSalonHistory. Required scope: table-sessions:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Histórico de uma mesa",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/tables/{{table_id}}/history?restaurant_id={{restaurant_id}}&start_date={{start_date}}&end_date={{end_date}}&limit=50",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: listSalonTableHistory. Required scope: table-sessions:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Consultar chamados de mesas",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/table-assistance?restaurant_id={{restaurant_id}}&start_date={{start_date}}&end_date={{end_date}}&limit=50",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: listSalonAssistance. Required scope: table-assistance:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Consultar caixas em aberto",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/cash-register?restaurant_id={{restaurant_id}}",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: listSalonCashRegisters. Required scope: cash-register:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Histórico de balcão",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/counter-mode/history?restaurant_id={{restaurant_id}}&start_date={{start_date}}&end_date={{end_date}}&limit=50",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: listSalonCounterHistory. Required scope: table-sessions:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Consultar reservas da mesa",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/tables/{{table_id}}/reservations?restaurant_id={{restaurant_id}}&start_date={{start_date}}&end_date={{end_date}}&limit=50",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: listSalonReservations. Required scope: reservations:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Consultar reserva",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/reservations/{{reservation_id}}?restaurant_id={{restaurant_id}}",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: getSalonReservation. Required scope: reservations:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Consultar métricas por mesa",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/tables/metrics?restaurant_id={{restaurant_id}}&start_date={{start_date}}&end_date={{end_date}}",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "description": "OpenAPI operationId: getSalonMetrics. Required scope: reports:tables:read. Restaurant-scoped read. "
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "pm.test('Expected status',()=>pm.response.to.have.status(200));"
            ]
          }
        }
      ]
    },
    {
      "name": "Acompanhar atualizações do salão por SSE",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/v1/tables/events?restaurant_id={{restaurant_id}}",
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{access_token}}",
              "type": "string"
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "text/event-stream"
          }
        ],
        "description": "OpenAPI operationId: streamSalonEvents. Required scope: tables:read. Restaurant-scoped read. Use a streaming client; stop manually. Reconnect requires a full reload."
      }
    }
  ]
}
