{"openapi":"3.1.0","info":{"title":"API do VTX Tap","version":"1.0.0","summary":"Cardápio, pedidos, mesas, clube, reservas e o resto do painel do restaurante.","description":"A documentação completa, com os guias e os exemplos, fica em https://tap.vortexsystems.tech/api.","contact":{"name":"VTX Tap","url":"https://tap.vortexsystems.tech/api","email":"contato@vortexsystems.tech"},"termsOfService":"https://tap.vortexsystems.tech/termos"},"servers":[{"url":"https://tap.vortexsystems.tech/api/v1","description":"Produção"}],"tags":[{"name":"Cardápio"},{"name":"Ajustes"},{"name":"Pedidos"},{"name":"Comandas"},{"name":"Mesas e salão"},{"name":"Chamados"},{"name":"Clube de fidelidade"},{"name":"Reservas"},{"name":"Fila de espera"},{"name":"Prorrogação"},{"name":"Vales-presente"},{"name":"Relatórios"},{"name":"Comentários"},{"name":"Mural"},{"name":"Plaquinhas"},{"name":"Telão"},{"name":"Avisos no celular"},{"name":"Estoque"},{"name":"Custos e valores do estoque"},{"name":"Financeiro"},{"name":"Caixa e pagamentos"},{"name":"Conta e rede"}],"paths":{"/restaurante":{"get":{"operationId":"restaurante_ver","summary":"Ver o restaurante","description":"Nome, endereço da página, os serviços do plano e os links (página, mesa e painel). Com a chave da rede, informe a unidade no cabeçalho VTX-Restaurante.\n\nPermissão: `ajustes:ler`.","tags":["Ajustes"],"security":[{"chave":[]},{"oauth":["ajustes:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"ajustes:ler","x-vtx-destrutivo":false}},"/eu":{"get":{"operationId":"credencial_ver","summary":"Ver a credencial","description":"Quem está chamando: o nome da chave (ou da conexão), as permissões, o restaurante e quanto sobra do limite.\n\nPermissão: `qualquer`.","tags":["Conta e rede"],"security":[{"chave":[]},{"oauth":["cardapio:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"*","x-vtx-destrutivo":false}},"/unidades":{"get":{"operationId":"unidades_listar","summary":"Listar as unidades da rede","description":"Só com a chave da rede: as unidades que ela alcança (id, endereço e nome). Use o endereço no cabeçalho VTX-Restaurante das outras chamadas.\n\nPermissão: `qualquer`.","tags":["Conta e rede"],"security":[{"chave":[]},{"oauth":["cardapio:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"*","x-vtx-destrutivo":false}},"/cardapio":{"get":{"operationId":"cardapio_ver","summary":"Ver o cardápio","description":"O cardápio inteiro: as categorias e os pratos de cada uma. Cada prato traz também, só para ler, o resumo das avaliações (avaliacoes: aprovação e avaliações em 90 dias, vendidos em 30, os selos e as marcações mais citadas). A resposta traz o ETag; mande-o em If-Match ao mudar para não apagar a mudança de outra pessoa.\n\nPermissão: `cardapio:ler`.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ categorias: [{ id, nome, setor?, itens: [prato com avaliacoes] }], versao }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:ler","x-vtx-destrutivo":false},"put":{"operationId":"cardapio_substituir","summary":"Substituir o cardápio inteiro","description":"Troca todas as categorias e os pratos de uma vez (como importar de outro sistema). Exige If-Match com o ETag do cardápio atual.\n\nPermissão: `cardapio:escrever`. **Desfaz algo**: confira antes.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"categorias":{"type":"array","items":{"type":"object"},"description":"As categorias com os pratos."}},"required":["categorias"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":true}},"/cardapio/itens/{id}":{"get":{"operationId":"cardapio_item_ver","summary":"Ver um prato","description":"Um prato pelo id, com a categoria em que está e o resumo das avaliações (avaliacoes, só para ler).\n\nPermissão: `cardapio:ler`.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:ler"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Id do prato."},"description":"Id do prato."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:ler","x-vtx-destrutivo":false},"patch":{"operationId":"cardapio_item_atualizar","summary":"Mudar um prato","description":"Muda só os campos enviados (nome, preço, descrição, onde aparece...). Para tirar o prato do cardápio da mesa, salao: false.\n\nPermissão: `cardapio:escrever`.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Id do prato."},"description":"Id do prato."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string","description":"Nome (até 80 letras)."},"desc":{"type":"string","description":"Descrição."},"preco":{"type":"number","minimum":0,"description":"Preço em reais (ex.: 32.9)."},"foto":{"type":"string","description":"Endereço https da foto."},"tags":{"type":"array","items":{"type":"string"},"description":"Selos (ex.: vegano, picante)."},"destaque":{"type":"boolean","description":"Aparece como destaque."},"salao":{"type":"boolean","description":"Aparece no cardápio da mesa."},"delivery":{"type":"boolean","description":"Aparece no delivery."},"dias":{"type":"array","items":{"type":"integer"},"description":"Dias da semana em que aparece (0 = domingo)."},"setor":{"type":"string","description":"Setor de preparo (ex.: cozinha, bar)."},"nosDestaques":{"type":"boolean","description":"Entra no feed dos Destaques (precisa de foto ou vídeo)."},"categoria":{"type":"string","description":"Mover para esta categoria (id)."},"tambem_em":{"type":["array","null"],"items":{"type":"string"},"description":"Outras categorias em que o mesmo prato aparece (os ids ou os nomes), além da dele. Ex.: [\"Lançamentos\"]. Continua um prato só. [] ou null tira de todas."},"fiscal":{"type":"object","properties":{"perfil":{"type":"string","description":"Id do perfil fiscal."},"ncm":{"type":"string","description":"NCM, 8 números."},"cfop":{"type":"string","description":"CFOP, 4 números."},"csosn":{"type":"string","description":"CSOSN (Simples Nacional): 101, 102, 103, 300, 400, 500 ou 900."},"cst":{"type":"string","description":"CST do ICMS (fora do Simples), 2 números."},"origem":{"type":"string","description":"Origem da mercadoria, de 0 a 8."},"cest":{"type":"string","description":"CEST, 7 números (só se tiver)."},"unidade":{"type":"string","description":"Unidade (até 6 letras). Sem ela, vale UN."}},"description":"Dados fiscais do prato (para a nota fiscal do PDV): o perfil (id de um perfil de /v1/fiscal/config) e só o que for diferente dele. Campo vazio usa o do perfil; null tira tudo."}},"required":[]},"example":{"preco":34.9}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":false},"delete":{"operationId":"cardapio_item_apagar","summary":"Apagar um prato","description":"Tira o prato do cardápio de vez. Para esconder sem apagar, use salao: false e delivery: false.\n\nPermissão: `cardapio:escrever`. **Desfaz algo**: confira antes.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Id do prato."},"description":"Id do prato."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":true}},"/cardapio/categorias/{categoria}/itens":{"post":{"operationId":"cardapio_item_criar","summary":"Criar um prato","description":"Cria um prato na categoria. O id é gerado e volta na resposta. Com tambem_em, o prato aparece também em outras categorias.\n\nPermissão: `cardapio:escrever`.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"name":"categoria","in":"path","required":true,"schema":{"type":"string","description":"Id da categoria."},"description":"Id da categoria."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string","description":"Nome (até 80 letras)."},"desc":{"type":"string","description":"Descrição."},"preco":{"type":"number","minimum":0,"description":"Preço em reais (ex.: 32.9)."},"foto":{"type":"string","description":"Endereço https da foto."},"tags":{"type":"array","items":{"type":"string"},"description":"Selos (ex.: vegano, picante)."},"destaque":{"type":"boolean","description":"Aparece como destaque."},"salao":{"type":"boolean","description":"Aparece no cardápio da mesa."},"delivery":{"type":"boolean","description":"Aparece no delivery."},"dias":{"type":"array","items":{"type":"integer"},"description":"Dias da semana em que aparece (0 = domingo)."},"setor":{"type":"string","description":"Setor de preparo (ex.: cozinha, bar)."},"nosDestaques":{"type":"boolean","description":"Entra no feed dos Destaques (precisa de foto ou vídeo)."},"tambem_em":{"type":["array","null"],"items":{"type":"string"},"description":"Outras categorias em que o mesmo prato aparece (os ids ou os nomes), além da dele. Ex.: [\"Lançamentos\"]. Continua um prato só. [] ou null tira de todas."},"fiscal":{"type":"object","properties":{"perfil":{"type":"string","description":"Id do perfil fiscal."},"ncm":{"type":"string","description":"NCM, 8 números."},"cfop":{"type":"string","description":"CFOP, 4 números."},"csosn":{"type":"string","description":"CSOSN (Simples Nacional): 101, 102, 103, 300, 400, 500 ou 900."},"cst":{"type":"string","description":"CST do ICMS (fora do Simples), 2 números."},"origem":{"type":"string","description":"Origem da mercadoria, de 0 a 8."},"cest":{"type":"string","description":"CEST, 7 números (só se tiver)."},"unidade":{"type":"string","description":"Unidade (até 6 letras). Sem ela, vale UN."}},"description":"Dados fiscais do prato (para a nota fiscal do PDV): o perfil (id de um perfil de /v1/fiscal/config) e só o que for diferente dele. Campo vazio usa o do perfil; null tira tudo."}},"required":["nome","preco"]},"example":{"nome":"Pastel de queijo","preco":12.5,"desc":"Massa fina e queijo minas."}}}},"responses":{"201":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":false}},"/cardapio/categorias":{"post":{"operationId":"cardapio_categoria_criar","summary":"Criar uma categoria","description":"Cria uma categoria vazia no fim do cardápio (ou na posição pedida).\n\nPermissão: `cardapio:escrever`.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string","description":"Nome da categoria."},"posicao":{"type":"integer","minimum":0,"description":"Posição (0 = primeira)."},"setor":{"type":"string","description":"Setor de preparo padrão da categoria."}},"required":["nome"]}}}},"responses":{"201":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":false}},"/cardapio/categorias/{categoria}":{"patch":{"operationId":"cardapio_categoria_atualizar","summary":"Mudar uma categoria","description":"Muda o nome, o setor de preparo ou a posição.\n\nPermissão: `cardapio:escrever`.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"name":"categoria","in":"path","required":true,"schema":{"type":"string","description":"Id da categoria."},"description":"Id da categoria."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string"},"setor":{"type":"string"},"posicao":{"type":"integer","minimum":0}},"required":[]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":false},"delete":{"operationId":"cardapio_categoria_apagar","summary":"Apagar uma categoria","description":"Apaga a categoria. Com pratos dentro, só com mover_para (a categoria que recebe os pratos) ou apagar_pratos: true.\n\nPermissão: `cardapio:escrever`. **Desfaz algo**: confira antes.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"name":"categoria","in":"path","required":true,"schema":{"type":"string","description":"Id da categoria."},"description":"Id da categoria."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mover_para":{"type":"string","description":"Id da categoria que recebe os pratos."},"apagar_pratos":{"type":"boolean","description":"Apaga os pratos junto."}},"required":[]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":true}},"/cardapio/precos":{"post":{"operationId":"cardapio_precos","summary":"Mudar preços em massa","description":"Muda vários preços numa chamada só: uma lista de { id, preco } ou um reajuste em porcentagem (todos os pratos ou só de algumas categorias), com o arredondamento. Com simular: true, só mostra o antes e o depois.\n\nPermissão: `cardapio:escrever`.","tags":["Cardápio"],"security":[{"chave":[]},{"oauth":["cardapio:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"itens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"preco":{"type":"number"}},"required":["id","preco"]},"description":"Lista de { id, preco }."},"percentual":{"type":"number","description":"Reajuste em % (ex.: 8 sobe 8%; -5 desce 5%)."},"categorias":{"type":"array","items":{"type":"string"},"description":"Só estas categorias (ids), no reajuste."},"arredondar":{"type":"string","enum":["centavos","0.50","0.90"],"description":"Arredondamento do reajuste: centavos (padrão), 0.50 ou 0.90."},"simular":{"type":"boolean","description":"Só mostra o antes e o depois, sem gravar."}},"required":[]},"example":{"percentual":8,"categorias":["bebidas"],"arredondar":"0.90","simular":true}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"cardapio:escrever","x-vtx-destrutivo":false}},"/ajustes/{secao}":{"get":{"operationId":"ajustes_ver","summary":"Ver uma seção dos ajustes","description":"Os ajustes de uma seção, como o painel guarda. Pix, CNPJs e a conferência da SEFAZ não saem pela API. Traz o ETag.\n\nPermissão: `ajustes:ler`.","tags":["Ajustes"],"security":[{"chave":[]},{"oauth":["ajustes:ler"]}],"parameters":[{"name":"secao","in":"path","required":true,"schema":{"type":"string","enum":["restaurante","wifi","mesas","widgets","fidelidade","delivery","prorrogacao","reservas"],"description":"A seção: restaurante, wifi, mesas, widgets, fidelidade, delivery, prorrogacao ou reservas."},"description":"A seção: restaurante, wifi, mesas, widgets, fidelidade, delivery, prorrogacao ou reservas."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"ajustes:ler","x-vtx-destrutivo":false},"patch":{"operationId":"ajustes_mudar","summary":"Mudar uma seção dos ajustes","description":"Junta o enviado com o que já existe (JSON Merge Patch, RFC 7396: null apaga o campo). Pix, CNPJs, dados fiscais e a SEFAZ ficam como estão: só pelo painel. A seção fidelidade pede também clube:escrever. Na seção mesas, sino é a chave geral; sinoMesas e sinoComandas permitem desligar o chamado só nas mesas ou só nas comandas (ausentes: ligado). Com sino=false, os dois ficam desligados. O pedido pelo celular depende do sino da origem. Mande If-Match com o ETag.\n\nPermissão: `ajustes:escrever`.","tags":["Ajustes"],"security":[{"chave":[]},{"oauth":["ajustes:escrever"]}],"parameters":[{"name":"secao","in":"path","required":true,"schema":{"type":"string","enum":["restaurante","wifi","mesas","widgets","fidelidade","delivery","prorrogacao","reservas"],"description":"A seção: restaurante, wifi, mesas, widgets, fidelidade, delivery, prorrogacao ou reservas."},"description":"A seção: restaurante, wifi, mesas, widgets, fidelidade, delivery, prorrogacao ou reservas."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mudancas":{"type":["object","array"],"description":"Os campos que mudam (um objeto). Na seção widgets, que é uma lista, a lista nova inteira (no widget de link criado pelo restaurante, icone é o nome do ícone e iconeImg, opcional, a URL https de uma imagem quadrada que substitui o ícone; no widget cardapio ou fidelidade, corCard é a cor do card, #rrggbb; sem ela, o desenho padrão; no cardapio, corQtd é a cor da etiqueta com a quantidade de itens, #rrggbb; sem ela, segue o card). Na seção fidelidade, instagram.premio é pontos (padrão) ou selo: no cartão de selos o post vale sempre 1 selo, no clube de pontos sempre os pontos, e nos dois por horário vale o escolhido. Também na seção fidelidade, avaliacao é o prêmio por avaliar os pratos: { ativo, premio (pontos ou selo), pontos (1 a 1.000), aCada (1 selo a cada 3 a 30 pratos), maxItensPedido, maxDia, maxMes }; o prêmio é sempre o mesmo para Gostei e Não gostei. No widget cardapio, avaliacoes é o que o cliente vê: { ativo, maisPedido, maisAvaliado, aprovacao, minimo (5 a 30), tags: { positivas, negativas } }. No widget jogos, premio é o quiz da noite valendo prêmio: { ativo, premios: [1º, 2º e 3º lugar, cada um { tipo: pontos (com pontos, 1 a 5.000), selo, produto (com produto, até 60 letras) ou nada }] }; precisa do programa de fidelidade no ar."}},"required":["mudancas"]},"example":{"mudancas":{"horarios":{"seg":"18:00-23:00"}}}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"ajustes:escrever","x-vtx-destrutivo":false}},"/pedidos/mesa":{"get":{"operationId":"pedidos_mesa_listar","summary":"Listar os pedidos da mesa","description":"Os pedidos feitos pelo celular na mesa, na comanda e no balcão, do mais novo para o mais antigo.\n\nPermissão: `pedidos:ler`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["recebido","preparo","pronto","entregue","cancelado"],"description":"recebido, preparo, pronto, entregue ou cancelado."},"description":"recebido, preparo, pronto, entregue ou cancelado."},{"name":"mesa","in":"query","required":false,"schema":{"type":"integer","description":"Só desta mesa."},"description":"Só desta mesa."},{"name":"desde","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados a partir deste momento (ISO 8601)."},"description":"Só os criados a partir deste momento (ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados antes deste momento (ISO 8601)."},"description":"Só os criados antes deste momento (ISO 8601)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:ler","x-vtx-destrutivo":false}},"/pedidos/mesa/{id}/status":{"post":{"operationId":"pedido_mesa_status","summary":"Mudar o andamento de um pedido da mesa","description":"Avança ou cancela o pedido (preparo, pronto, entregue ou cancelado). Cancelar pede o motivo.\n\nPermissão: `pedidos:escrever`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pedido."},"description":"Id do pedido."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["preparo","pronto","entregue","cancelado"]},"motivo":{"type":"string","description":"Motivo (no cancelamento)."}},"required":["status"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:escrever","x-vtx-destrutivo":false}},"/pedidos/mesa/{id}/partes/{setor}/status":{"post":{"operationId":"pedido_mesa_parte_status","summary":"Mudar o andamento de uma parte do pedido","description":"Com o pedido dividido por setor: muda só a parte de um setor (ex.: a bebida do bar).\n\nPermissão: `pedidos:escrever`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pedido."},"description":"Id do pedido."},{"name":"setor","in":"path","required":true,"schema":{"type":"string","description":"Id do setor."},"description":"Id do setor."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["preparo","pronto","entregue","cancelado"]},"motivo":{"type":"string"}},"required":["status"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:escrever","x-vtx-destrutivo":false}},"/pedidos/mesa/{id}/mesa":{"post":{"operationId":"pedido_mesa_trocar_mesa","summary":"Mudar a mesa de um pedido","description":"Passa o pedido para outra mesa (ou marca para levar).\n\nPermissão: `pedidos:escrever`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pedido."},"description":"Id do pedido."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mesa":{"type":"integer","description":"Mesa de destino."},"levar":{"type":"boolean","description":"É para levar."}},"required":["mesa"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:escrever","x-vtx-destrutivo":false}},"/pedidos/mesa/{id}/chamar":{"post":{"operationId":"pedido_mesa_chamar","summary":"Chamar quem fez o pedido","description":"Avisa no celular do cliente que o pedido de retirar no balcão está pronto.\n\nPermissão: `pedidos:escrever`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pedido."},"description":"Id do pedido."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:escrever","x-vtx-destrutivo":false}},"/pedidos/delivery":{"get":{"operationId":"pedidos_delivery_listar","summary":"Listar os pedidos do delivery","description":"Os pedidos do delivery (do VTX Tap e dos aplicativos ligados), do mais novo para o mais antigo. O CPF sai mascarado.\n\nPermissão: `pedidos:ler`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["recebido","preparo","saiu","entregue","cancelado"]}},{"name":"desde","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados a partir deste momento (ISO 8601)."},"description":"Só os criados a partir deste momento (ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados antes deste momento (ISO 8601)."},"description":"Só os criados antes deste momento (ISO 8601)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:ler","x-vtx-destrutivo":false}},"/pedidos/delivery/{id}/status":{"post":{"operationId":"pedido_delivery_status","summary":"Mudar o andamento de um pedido do delivery","description":"Preparo, saiu (com o entregador), entregue ou cancelado (com o motivo). O cliente acompanha na hora.\n\nPermissão: `pedidos:escrever`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pedido."},"description":"Id do pedido."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["recebido","preparo","saiu","entregue","cancelado"]},"entregador":{"type":"string","description":"Nome do entregador (ao sair)."},"motivo":{"type":"string","description":"Motivo (no cancelamento)."}},"required":["status"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:escrever","x-vtx-destrutivo":false}},"/cozinha/setores/{setor}/fechamento":{"post":{"operationId":"cozinha_setor_fechar","summary":"Fechar ou reabrir um setor da cozinha","description":"Fecha o setor para pedidos pelo celular até as 05:00 (ou reabre).\n\nPermissão: `pedidos:escrever`.","tags":["Pedidos"],"security":[{"chave":[]},{"oauth":["pedidos:escrever"]}],"parameters":[{"name":"setor","in":"path","required":true,"schema":{"type":"string","description":"Id do setor (ou \"cozinha\")."},"description":"Id do setor (ou \"cozinha\")."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"fechar":{"type":"boolean","description":"true fecha; false reabre."}},"required":["fechar"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"pedidos:escrever","x-vtx-destrutivo":false}},"/comandas":{"get":{"operationId":"comandas_listar","summary":"Listar as comandas","description":"As comandas abertas (e as fechadas nos últimos dias, com dias).\n\nPermissão: `comandas:ler`.","tags":["Comandas"],"security":[{"chave":[]},{"oauth":["comandas:ler"]}],"parameters":[{"name":"dias","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":90,"description":"Inclui as fechadas nestes últimos dias (0 = só abertas)."},"description":"Inclui as fechadas nestes últimos dias (0 = só abertas)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comandas:ler","x-vtx-destrutivo":false}},"/comandas/{id}/lancamentos":{"post":{"operationId":"comanda_lancar","summary":"Lançar na comanda","description":"Lança um valor avulso na comanda (ex.: couvert, item pedido direto ao garçom).\n\nPermissão: `comandas:escrever`.","tags":["Comandas"],"security":[{"chave":[]},{"oauth":["comandas:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da comanda."},"description":"Id da comanda."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"descricao":{"type":"string"},"valor":{"type":"number","description":"Valor de cada um, em reais."},"qtd":{"type":"integer","minimum":1}},"required":["descricao","valor"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comandas:escrever","x-vtx-destrutivo":false}},"/comandas/lancamentos/{id}":{"delete":{"operationId":"comanda_lancamento_cancelar","summary":"Cancelar um lançamento","description":"Tira um lançamento da comanda.\n\nPermissão: `comandas:escrever`. **Desfaz algo**: confira antes.","tags":["Comandas"],"security":[{"chave":[]},{"oauth":["comandas:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do lançamento."},"description":"Id do lançamento."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comandas:escrever","x-vtx-destrutivo":true}},"/comandas/{id}/pedidos":{"post":{"operationId":"comanda_pedir","summary":"Fazer um pedido na comanda","description":"Lança pratos do cardápio na comanda e manda para o preparo (ou já entregues).\n\nPermissão: `comandas:escrever`.","tags":["Comandas"],"security":[{"chave":[]},{"oauth":["comandas:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da comanda."},"description":"Id da comanda."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"itens":{"type":"array","items":{"type":"object"},"description":"Lista de { id do prato, qtd, obs? }."},"obs":{"type":"string"},"entregue":{"type":"boolean","description":"Já entregue (não vai para a cozinha)."}},"required":["itens"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comandas:escrever","x-vtx-destrutivo":false}},"/comandas/{id}/fechar":{"post":{"operationId":"comanda_fechar","summary":"Fechar a comanda","description":"Fecha a comanda (perdida: true quando o cliente sumiu sem pagar).\n\nPermissão: `comandas:escrever`.","tags":["Comandas"],"security":[{"chave":[]},{"oauth":["comandas:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da comanda."},"description":"Id da comanda."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"perdida":{"type":"boolean"}},"required":[]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comandas:escrever","x-vtx-destrutivo":false}},"/comandas/numeros/{numero}/liberar":{"post":{"operationId":"comanda_numero_liberar","summary":"Liberar um número de comanda","description":"Libera o número para outra pessoa usar.\n\nPermissão: `comandas:escrever`.","tags":["Comandas"],"security":[{"chave":[]},{"oauth":["comandas:escrever"]}],"parameters":[{"name":"numero","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comandas:escrever","x-vtx-destrutivo":false}},"/salao":{"get":{"operationId":"salao_ver","summary":"Ver o salão","description":"As mesas com gente, as juntas, quem está em cada uma e há quanto tempo.\n\nPermissão: `mesas:ler`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:ler","x-vtx-destrutivo":false}},"/lotacao":{"get":{"operationId":"lotacao_ver","summary":"Ver a lotação","description":"Quantas mesas e pessoas estão na casa agora.\n\nPermissão: `mesas:ler`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:ler","x-vtx-destrutivo":false}},"/mesas/{mesa}/ocupacao":{"post":{"operationId":"mesa_ocupar","summary":"Marcar a mesa como ocupada ou livre","description":"Marca a ocupação feita pela equipe (com o número de pessoas).\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"name":"mesa","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"ocupada":{"type":"boolean"},"pessoas":{"type":"integer","minimum":1}},"required":["ocupada"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/mesas/{mesa}/fechar":{"post":{"operationId":"mesa_fechar","summary":"Fechar a mesa","description":"Encerra a mesa: os celulares saem e ela fica livre.\n\nPermissão: `mesas:escrever`. **Desfaz algo**: confira antes.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"name":"mesa","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":true}},"/mesas/trocar":{"post":{"operationId":"mesa_trocar","summary":"Trocar ou juntar mesas","description":"Passa quem está numa mesa para outra (ou junta as duas).\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"de":{"type":"integer"},"para":{"type":"integer"},"juntar":{"type":"boolean"}},"required":["de","para"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/mesas/{mesa}/separar":{"post":{"operationId":"mesa_separar","summary":"Separar mesas juntas","description":"Desfaz a junção da mesa.\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"name":"mesa","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/mesas/{mesa}/pedidos":{"post":{"operationId":"mesa_pedir","summary":"Lançar pratos na mesa","description":"A equipe lança pratos do cardápio na conta da mesa aberta, pelo preço do cardápio; vão para o preparo (ou já entregues, só na conta). Exige o cabeçalho Idempotency-Key: repetir a mesma chave não lança de novo. Precisa do PDV liberado.\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"name":"mesa","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":500}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"itens":{"type":"array","items":{"type":"object"},"description":"Lista de { id do prato, qtd, opcoes? ([{ g, o, q }]), obs? }."},"obs":{"type":"string","description":"Observação para a cozinha."},"entregue":{"type":"boolean","description":"Já entregue (não vai para a cozinha)."}},"required":["itens"]}}}},"responses":{"200":{"description":"{ pedido: { id, numero, subtotal } }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/mesas/{mesa}/lancamentos":{"post":{"operationId":"mesa_lancar","summary":"Lançar um valor solto na mesa","description":"Lança um valor fora do cardápio na conta da mesa aberta (ex.: peso, couvert), já entregue. Exige o cabeçalho Idempotency-Key. Precisa do PDV liberado.\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"name":"mesa","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":500}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"descricao":{"type":"string"},"valor":{"type":"number","description":"Valor de cada um, em reais."},"qtd":{"type":"integer","minimum":1,"maximum":99}},"required":["descricao","valor"]}}}},"responses":{"200":{"description":"{ pedido: { id, numero, subtotal } }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/contas":{"get":{"operationId":"conta_ver","summary":"Ver a conta da mesa ou da comanda","description":"Os itens (com a origem: app ou equipe), os descontos, o serviço, o total, o que já foi pago, os pendentes (o que chegou depois de fechar) e as listas do garçom que ainda não estão na conta. Informe mesa ou comanda. Precisa do PDV liberado.\n\nPermissão: `mesas:ler`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:ler"]}],"parameters":[{"name":"mesa","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"comanda","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Id da comanda."},"description":"Id da comanda."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:ler","x-vtx-destrutivo":false}},"/contas/ajustes":{"post":{"operationId":"conta_desconto","summary":"Dar um desconto ou uma cortesia","description":"Desconto em reais (valor) ou em porcentagem (percentual) na conta toda (rateado pelos itens) ou num item (item_ref, da lista de itens da conta); cortesia deixa o item de graça. O motivo é obrigatório. Com a conta em pagamento, recusa. A mesma chave não dá o desconto duas vezes.\n\nPermissão: `caixa:escrever`. **Desfaz algo**: confira antes.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"alvo":{"type":"object","properties":{"mesa":{"type":"integer","minimum":1,"maximum":500},"comanda":{"type":"string","format":"uuid"}},"description":"A conta: { mesa: número } ou { comanda: id }."},"tipo":{"type":"string","enum":["desconto","cortesia"]},"valor":{"type":"number","description":"Desconto em reais."},"percentual":{"type":"number","description":"Desconto em porcentagem (de 0 a 100)."},"item_ref":{"type":"string","description":"O item da conta (ref). Vazio: a conta toda."},"motivo":{"type":"string","description":"De 3 a 140 letras."},"chave":{"type":"string","description":"Um texto único por desconto (de 8 a 80 letras, ex.: um UUID): repetir não dá de novo."}},"required":["alvo","tipo","motivo"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":true}},"/contas/ajustes/{id}":{"delete":{"operationId":"conta_ajuste_cancelar","summary":"Cancelar um desconto ou uma cortesia","description":"Tira o desconto ou a cortesia da conta (o valor volta). Com a conta em pagamento, recusa.\n\nPermissão: `caixa:escrever`. **Desfaz algo**: confira antes.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do ajuste (da lista de ajustes da conta)."},"description":"Id do ajuste (da lista de ajustes da conta)."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":true}},"/contas/transferir":{"post":{"operationId":"conta_transferir","summary":"Transferir itens ou juntar contas","description":"Passa pedidos (e lançamentos da comanda) de uma conta aberta para outra mesa aberta ou comanda aberta. Sem pedidos nem lançamentos, passa tudo (juntar), com os descontos da conta toda. Da conta fechada (esperando o pagamento) só saem os pendentes; a comanda que já fechou não passa nada. Repetir não muda nada.\n\nPermissão: `mesas:escrever`. **Desfaz algo**: confira antes.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"de":{"type":"object","properties":{"mesa":{"type":"integer","minimum":1,"maximum":500},"comanda":{"type":"string","format":"uuid"}},"description":"A conta: { mesa: número } ou { comanda: id }."},"para":{"type":"object","properties":{"mesa":{"type":"integer","minimum":1,"maximum":500},"comanda":{"type":"string","format":"uuid"}},"description":"A conta: { mesa: número } ou { comanda: id }."},"pedidos":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Ids dos pedidos que vão."},"lancamentos":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Ids dos lançamentos da comanda que vão."}},"required":["de","para"]}}}},"responses":{"200":{"description":"{ de: conta, para: conta }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":true}},"/contas/fechar":{"post":{"operationId":"conta_fechar","summary":"Fechar a conta","description":"Fecha a conta para o pagamento: o total fica gravado e o que chegar depois fica em pendentes. Fechar de novo não muda nada. Informe mesa ou comanda.\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mesa":{"type":"integer","minimum":1,"maximum":500},"comanda":{"type":"string","format":"uuid","description":"Id da comanda."}},"required":[]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/contas/{id}/reabrir":{"post":{"operationId":"conta_reabrir","summary":"Reabrir a conta","description":"Volta a conta fechada para aberta (os pendentes entram). Paga não reabre.\n\nPermissão: `caixa:escrever`.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da conta (conta_id)."},"description":"Id da conta (conta_id)."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":false}},"/caixa/pagamentos":{"post":{"operationId":"conta_pagar","summary":"Receber um pagamento da conta","description":"Registra um pagamento na conta (a conta toda ou uma parte), no caixa aberto. Em dinheiro, o que passa do que falta vira troco; com gorjeta, vira gorjeta; nas outras formas, recusa. Quando soma o total, a conta fica paga. A mesma chave não registra duas vezes.\n\nPermissão: `caixa:escrever`. **Desfaz algo**: confira antes.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"conta_id":{"type":"string","format":"uuid","description":"Id da conta (conta_id). Ou informe o alvo."},"alvo":{"type":"object","properties":{"mesa":{"type":"integer","minimum":1,"maximum":500},"comanda":{"type":"string","format":"uuid"}},"description":"A conta: { mesa: número } ou { comanda: id }."},"valor":{"type":"number","minimum":0.01,"maximum":999999.99,"description":"Em reais, até 2 casas (ex.: 35.5)."},"forma":{"type":"string","enum":["dinheiro","credito","debito","voucher","pix","vale_presente","outros"]},"caixa":{"type":"string","format":"uuid","description":"O turno do caixa aberto (da lista de caixas). Vazio: o caixa do ponto informado."},"ponto":{"type":"string","format":"uuid","description":"O caixa (ponto) que recebe, quando não informa o turno."},"pessoa":{"type":"string","description":"Quem pagou (até 60 letras), para a divisão."},"gorjeta":{"type":"boolean","description":"O que passa do que falta é gorjeta (só fora do dinheiro)."},"chave":{"type":"string","description":"Um texto único por pagamento (de 8 a 80 letras, ex.: um UUID): repetir não registra de novo."}},"required":["valor","forma","chave"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":true}},"/caixa/pagamentos/{id}/estornar":{"post":{"operationId":"conta_pagamento_estornar","summary":"Estornar um pagamento do caixa","description":"Desfaz um pagamento registrado no caixa (o turno ainda aberto). A conta paga volta a ficar em pagamento. Pagamentos da maquininha e do Pix se estornam neles. Precisa de gerente.\n\nPermissão: `caixa:escrever`. **Desfaz algo**: confira antes.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pagamento (da lista de pagamentos da conta)."},"description":"Id do pagamento (da lista de pagamentos da conta)."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"motivo":{"type":"string","description":"De 3 a 140 letras."}},"required":["motivo"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":true}},"/caixa/contas":{"get":{"operationId":"caixa_contas_abertas","summary":"Ver as contas a receber","description":"As contas abertas e em pagamento da casa, com o total, o que já foi pago e o que falta; e as antigas, de dias anteriores, ainda sem pagamento.\n\nPermissão: `caixa:ler`.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:ler","x-vtx-destrutivo":false}},"/caixa/pontos":{"get":{"operationId":"caixa_pontos","summary":"Ver os caixas da casa","description":"Os caixas (pontos de recebimento) e o turno aberto de cada um, com o fundo de troco e quem abriu.\n\nPermissão: `caixa:ler`.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:ler","x-vtx-destrutivo":false}},"/fiscal/config":{"get":{"operationId":"fiscal_config","summary":"Ver os dados fiscais","description":"A configuração da nota fiscal da casa (CNPJ, inscrição estadual, regime, endereço, ambiente, série e próximo número, o serviço na nota, quando emitir e os canais) e os perfis fiscais com os códigos (NCM, CFOP, CSOSN ou CST, origem, CEST, unidade). O CSC nunca volta: só se está configurado e os 4 últimos caracteres.\n\nPermissão: `caixa:ler`.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:ler","x-vtx-destrutivo":false}},"/fiscal/pendentes":{"get":{"operationId":"fiscal_pendentes","summary":"Ver os pratos sem dados fiscais","description":"Os itens do cardápio que ainda não têm os dados completos para a nota fiscal, com o que falta em cada um (ncm, cfop, csosn, cst, origem, cest, unidade ou a configuração da casa) e o NCM sugerido pelas notas de compra do Estoque, quando há.\n\nPermissão: `caixa:ler`.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:ler","x-vtx-destrutivo":false}},"/caixa/pontos/{id}/abrir":{"post":{"operationId":"caixa_abrir","summary":"Abrir o caixa","description":"Abre o turno do caixa com o fundo de troco em dinheiro. O caixa já aberto recusa.\n\nPermissão: `caixa:escrever`.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do caixa (ponto)."},"description":"Id do caixa (ponto)."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"fundo":{"type":"number","minimum":0,"description":"O troco que começa no caixa, em reais."}},"required":["fundo"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":false}},"/caixa/turnos/{id}":{"get":{"operationId":"caixa_resumo","summary":"Ver o resumo do turno do caixa","description":"O que entrou por forma de pagamento, o troco, as gorjetas, as sangrias e os suprimentos, os estornos e o esperado em cada forma.\n\nPermissão: `caixa:ler`.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:ler"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do turno do caixa."},"description":"Id do turno do caixa."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:ler","x-vtx-destrutivo":false}},"/caixa/turnos/{id}/movimentos":{"post":{"operationId":"caixa_movimento","summary":"Sangria ou suprimento no caixa","description":"Sangria tira dinheiro do caixa (até o que ele tem em dinheiro); suprimento põe. O motivo é obrigatório. A mesma chave não lança duas vezes.\n\nPermissão: `caixa:escrever`. **Desfaz algo**: confira antes.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do turno do caixa."},"description":"Id do turno do caixa."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"tipo":{"type":"string","enum":["sangria","suprimento"]},"valor":{"type":"number","description":"Em reais."},"motivo":{"type":"string","description":"De 3 a 140 letras."},"chave":{"type":"string","description":"Um texto único por movimento (de 8 a 120 letras)."}},"required":["tipo","valor","motivo"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":true}},"/caixa/turnos/{id}/fechar":{"post":{"operationId":"caixa_fechar","summary":"Fechar o caixa","description":"Fecha o turno com o que foi contado em cada forma (o dinheiro é obrigatório) e guarda a diferença para o esperado. Fechar de novo devolve o mesmo fechamento.\n\nPermissão: `caixa:escrever`. **Desfaz algo**: confira antes.","tags":["Caixa e pagamentos"],"security":[{"chave":[]},{"oauth":["caixa:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do turno do caixa."},"description":"Id do turno do caixa."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"contado":{"type":"object","properties":{"dinheiro":{"type":"number","minimum":0},"credito":{"type":"number","minimum":0},"debito":{"type":"number","minimum":0},"voucher":{"type":"number","minimum":0},"pix":{"type":"number","minimum":0},"vale_presente":{"type":"number","minimum":0},"outros":{"type":"number","minimum":0}},"required":["dinheiro"],"description":"O contado por forma, em reais: { dinheiro: 230.5, credito: 410, ... }."}},"required":["contado"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"caixa:escrever","x-vtx-destrutivo":true}},"/chamados/{id}/lancar":{"post":{"operationId":"chamado_lista_lancar","summary":"Lançar a lista do garçom na mesa","description":"A lista que o cliente mandou ao garçom vira um pedido da mesa, pelo preço do cardápio, uma vez só (repetir devolve o mesmo pedido). A lista com opções escolhidas é recusada: lance pelos pratos.\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do chamado."},"description":"Id do chamado."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"{ pedido: { id, numero, subtotal }, repetido? }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/sessoes":{"get":{"operationId":"sessoes_listar","summary":"Listar quem pediu para entrar na mesa","description":"Os celulares que abriram a mesa (pendentes de liberação, liberados ou encerrados).\n\nPermissão: `mesas:ler`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pendente","liberada","recusada","encerrada"]}},{"name":"mesa","in":"query","required":false,"schema":{"type":"integer"}},{"name":"desde","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados a partir deste momento (ISO 8601)."},"description":"Só os criados a partir deste momento (ISO 8601)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:ler","x-vtx-destrutivo":false}},"/sessoes/{id}/decisao":{"post":{"operationId":"sessao_decidir","summary":"Liberar ou recusar quem pediu a mesa","description":"Libera (ou recusa) o celular que pediu para usar a mesa.\n\nPermissão: `mesas:escrever`.","tags":["Mesas e salão"],"security":[{"chave":[]},{"oauth":["mesas:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pedido de entrada."},"description":"Id do pedido de entrada."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"liberar":{"type":"boolean"}},"required":["liberar"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mesas:escrever","x-vtx-destrutivo":false}},"/chamados":{"get":{"operationId":"chamados_listar","summary":"Listar os chamados","description":"Os chamados do sino (garçom, conta, água...), do mais novo para o mais antigo.\n\nPermissão: `chamados:ler`.","tags":["Chamados"],"security":[{"chave":[]},{"oauth":["chamados:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["aberto","a_caminho","resolvido","cancelado"]}},{"name":"mesa","in":"query","required":false,"schema":{"type":"integer"}},{"name":"desde","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados a partir deste momento (ISO 8601)."},"description":"Só os criados a partir deste momento (ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados antes deste momento (ISO 8601)."},"description":"Só os criados antes deste momento (ISO 8601)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"chamados:ler","x-vtx-destrutivo":false}},"/chamados/{id}":{"patch":{"operationId":"chamado_atualizar","summary":"Mudar o andamento de um chamado","description":"A caminho, resolvido ou cancelado.\n\nPermissão: `chamados:escrever`.","tags":["Chamados"],"security":[{"chave":[]},{"oauth":["chamados:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do chamado."},"description":"Id do chamado."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["aberto","a_caminho","resolvido","cancelado"]},"atendente":{"type":"string","description":"Quem atendeu."}},"required":["status"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"chamados:escrever","x-vtx-destrutivo":false}},"/clube/resumo":{"get":{"operationId":"clube_resumo","summary":"Resumo do clube","description":"Clientes, pontos dados e trocados, resgates e notas pendentes.\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/conquistas":{"get":{"operationId":"clube_conquistas","summary":"Metas e conquistas do clube","description":"As trilhas de metas do clube (clientes no clube, pontos dados, selos carimbados, prêmios entregues, notas lidas e clientes que voltaram 3 vezes), com o número de agora, os degraus e as conquistas com a data. Sem dado de cliente.\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ trilhas: [{ grupo, titulo, unidade, atual, metas, conquistas: [{ meta, em }] }], casa: { nome, logo, cor, pagina } }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/ranking":{"get":{"operationId":"clube_ranking","summary":"Ranking do clube","description":"Os 10 clientes que mais ganharam pontos no clube, o mesmo ranking da página do clube (o primeiro nome e a inicial do sobrenome). Com o clube ou o ranking desligado, ativo vem false e a lista vem vazia.\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ ativo, top: [{ posicao, nome, pontos }] }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/clientes":{"get":{"operationId":"clube_clientes_listar","summary":"Listar os clientes do clube","description":"Os clientes do clube (nome, pontos, nível, aniversário em dia e mês). O CPF sai mascarado; e-mail e telefone não saem. Para os aniversariantes de um mês, use aniversario_mes.\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"busca","in":"query","required":false,"schema":{"type":"string","description":"Parte do nome, ou o CPF inteiro."},"description":"Parte do nome, ou o CPF inteiro."},{"name":"aniversario_mes","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":12,"description":"Só quem faz aniversário neste mês (1 a 12). Cada cliente traz aniversario (dia/mês, quando ele informou a data) e aniversario_mes."},"description":"Só quem faz aniversário neste mês (1 a 12). Cada cliente traz aniversario (dia/mês, quando ele informou a data) e aniversario_mes."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/clientes/{cliente}/nivel":{"get":{"operationId":"clube_cliente_nivel","summary":"Ver o nível de um cliente","description":"O nível do cliente (achado pelo código, pelo nome ou pelo CPF) e quanto falta para o próximo.\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"name":"cliente","in":"path","required":true,"schema":{"type":"string","description":"O cliente: o código dele (como vem em clube_clientes_listar), o nome ou o CPF. Nome que bate com mais de uma pessoa não faz nada e devolve as pessoas, com o código, para escolher."},"description":"O cliente: o código dele (como vem em clube_clientes_listar), o nome ou o CPF. Nome que bate com mais de uma pessoa não faz nada e devolve as pessoas, com o código, para escolher."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false},"put":{"operationId":"clube_cliente_nivel_definir","summary":"Definir o nível de um cliente","description":"Fixa o nível do cliente à mão (ou volta ao automático com nivel vazio).\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"cliente","in":"path","required":true,"schema":{"type":"string","description":"O cliente: o código dele (como vem em clube_clientes_listar), o nome ou o CPF. Nome que bate com mais de uma pessoa não faz nada e devolve as pessoas, com o código, para escolher."},"description":"O cliente: o código dele (como vem em clube_clientes_listar), o nome ou o CPF. Nome que bate com mais de uma pessoa não faz nada e devolve as pessoas, com o código, para escolher."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nivel":{"type":"string","description":"Id do nível, ou vazio para o automático."}},"required":["nivel"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/lancamentos":{"post":{"operationId":"clube_lancar","summary":"Lançar pontos para um cliente","description":"Dá os pontos de uma compra (pelo valor) ao cliente, achado pelo código, pelo nome ou pelo CPF. No cartão de selos, carimba o selo. Devolve o lancamento_id, para cancelar depois se foi engano.\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"cliente":{"type":"string","description":"O cliente: o código dele (como vem em clube_clientes_listar), o nome ou o CPF. Nome que bate com mais de uma pessoa não faz nada e devolve as pessoas, com o código, para escolher."},"valor":{"type":"number","description":"Valor da compra em reais."},"descricao":{"type":"string"}},"required":["cliente","valor"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/lancamentos/{id}/cancelar":{"post":{"operationId":"clube_lancamento_cancelar","summary":"Cancelar um lançamento de pontos","description":"Cancela um lançamento feito à mão (o lancamento_id que clube_lancar devolve): entra um estorno com os mesmos pontos. Não cancela se o cliente já trocou parte desses pontos.\n\nPermissão: `clube:escrever`. **Desfaz algo**: confira antes.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","description":"O id do lançamento (lancamento_id)."},"description":"O id do lançamento (lancamento_id)."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":true}},"/clube/produtos-mais-vendidos":{"get":{"operationId":"clube_produtos_mais_vendidos","summary":"Produtos mais vendidos no clube","description":"Os produtos das notas dos clientes do clube (de um cliente, com cpf).\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"name":"cliente","in":"query","required":false,"schema":{"type":"string","description":"Opcional: só deste cliente (código, nome ou CPF)."},"description":"Opcional: só deste cliente (código, nome ou CPF)."},{"name":"dias","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":365}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/premios":{"get":{"operationId":"clube_premios_listar","summary":"Listar os prêmios","description":"Os prêmios do clube com os pontos de cada um.\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false},"post":{"operationId":"clube_premio_criar","summary":"Criar um prêmio","description":"Cria um prêmio no clube.\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string"},"descricao":{"type":"string"},"pontos":{"type":"integer","minimum":1},"imagem":{"type":"string","description":"Endereço https da imagem."},"ativo":{"type":"boolean"},"ordem":{"type":"integer"},"nivel_min":{"type":"string","description":"Só a partir deste nível."},"aniversario":{"type":"boolean","description":"Só no mês de aniversário."}},"required":["nome","pontos"]}}}},"responses":{"201":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/premios/{id}":{"patch":{"operationId":"clube_premio_atualizar","summary":"Mudar um prêmio","description":"Muda só os campos enviados.\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do prêmio."},"description":"Id do prêmio."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string"},"descricao":{"type":"string"},"pontos":{"type":"integer","minimum":1},"imagem":{"type":"string","description":"Endereço https da imagem."},"ativo":{"type":"boolean"},"ordem":{"type":"integer"},"nivel_min":{"type":"string","description":"Só a partir deste nível."},"aniversario":{"type":"boolean","description":"Só no mês de aniversário."}},"required":[]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false},"delete":{"operationId":"clube_premio_apagar","summary":"Apagar um prêmio","description":"Apaga o prêmio (os resgates já feitos ficam).\n\nPermissão: `clube:escrever`. **Desfaz algo**: confira antes.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do prêmio."},"description":"Id do prêmio."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":true}},"/clube/resgates":{"get":{"operationId":"clube_resgates_listar","summary":"Listar os resgates","description":"Os prêmios pedidos pelos clientes (pendentes, entregues ou cancelados).\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pendente","entregue","cancelado"]}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/resgates/{id}/decisao":{"post":{"operationId":"clube_resgate_decidir","summary":"Entregar ou cancelar um resgate","description":"Marca o prêmio como entregue (ou cancela e devolve os pontos).\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do resgate."},"description":"Id do resgate."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"entregar":{"type":"boolean"}},"required":["entregar"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/notas":{"get":{"operationId":"clube_notas_listar","summary":"Listar as notas fiscais do clube","description":"As notas que os clientes mandaram (pendentes de conferência, creditadas ou recusadas).\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pendente","creditada","recusada","estornada"]}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/notas/{chave}/aprovar":{"post":{"operationId":"clube_nota_aprovar","summary":"Aprovar uma nota","description":"Credita os pontos da nota pendente (com o valor conferido).\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"chave","in":"path","required":true,"schema":{"type":"string","description":"Chave de acesso da nota (44 números)."},"description":"Chave de acesso da nota (44 números)."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"valor":{"type":"number"},"emitida":{"type":"string","format":"date-time","description":"Data da nota."}},"required":["valor"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/notas/{chave}/recusar":{"post":{"operationId":"clube_nota_recusar","summary":"Recusar uma nota","description":"Recusa a nota pendente, com o motivo.\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"chave","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"motivo":{"type":"string"}},"required":["motivo"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/instagram":{"get":{"operationId":"clube_instagram_lista","summary":"Posts do Instagram para conferir","description":"Os posts que clientes mandaram para ganhar pontos ou 1 selo no cartão e que esperam conferência (cliente, link, premio e pontos), o prêmio de agora (premio: pontos ou selo) e o que o recurso rendeu em 30 dias (aprovados, pontos e selos).\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false}},"/clube/instagram/{id}/decisao":{"post":{"operationId":"clube_instagram_decidir","summary":"Aprovar ou recusar um post do Instagram","description":"Aprova (o prêmio das regras de agora entra na hora, uma vez só: os pontos ou 1 selo no cartão, conforme instagram.premio e o modo do clube) ou recusa o post, com o motivo que o cliente vê.\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do post."},"description":"Id do post."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"aprovar":{"type":"boolean"},"motivo":{"type":"string","description":"Ao recusar: por que o post não vale."}},"required":["aprovar"]}}}},"responses":{"200":{"description":"{ status: aprovado | recusado, premio: pontos | selo, pontos, saldo (com pontos), selos, total e completo (com selo, o cartão como ficou) }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/eventos":{"get":{"operationId":"clube_eventos_listar","summary":"Listar os jogos e eventos","description":"Os eventos com torcida do clube (jogos) e os resultados.\n\nPermissão: `clube:ler`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:ler","x-vtx-destrutivo":false},"post":{"operationId":"clube_evento_salvar","summary":"Criar ou mudar um evento","description":"Cria (ou muda, com id) um jogo com os times e os pontos de quem acerta.\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","description":"Para mudar um evento."},"nome":{"type":"string","description":"Nome do jogo ou evento."},"tipo":{"type":"string"},"data":{"type":"string","format":"date","description":"O dia."},"hora":{"type":"string","description":"HH:MM"},"times":{"type":"array","items":{"type":"string"},"description":"Os times ou as opções da torcida."},"mult":{"type":"number","description":"Multiplicador dos pontos de quem acerta."},"fixos":{"type":"integer","description":"Pontos fixos de quem acerta."}},"required":["nome","data"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/eventos/{id}/resultado":{"post":{"operationId":"clube_evento_resultado","summary":"Dar o resultado de um evento","description":"Informa quem venceu; os pontos vão para quem acertou.\n\nPermissão: `clube:escrever`.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do evento."},"description":"Id do evento."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"vencedor":{"type":"string"}},"required":["vencedor"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":false}},"/clube/eventos/{id}":{"delete":{"operationId":"clube_evento_apagar","summary":"Apagar um evento","description":"Apaga o evento.\n\nPermissão: `clube:escrever`. **Desfaz algo**: confira antes.","tags":["Clube de fidelidade"],"security":[{"chave":[]},{"oauth":["clube:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do evento."},"description":"Id do evento."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"clube:escrever","x-vtx-destrutivo":true}},"/reservas":{"get":{"operationId":"reservas_listar","summary":"Listar as reservas","description":"As reservas de um período (de e ate, no formato AAAA-MM-DD).\n\nPermissão: `reservas:ler`.","tags":["Reservas"],"security":[{"chave":[]},{"oauth":["reservas:ler"]}],"parameters":[{"name":"de","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Primeiro dia."},"description":"Primeiro dia."},{"name":"ate","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Último dia."},"description":"Último dia."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"reservas:ler","x-vtx-destrutivo":false},"post":{"operationId":"reserva_criar","summary":"Criar uma reserva","description":"A reserva feita pela equipe (telefone, balcão).\n\nPermissão: `reservas:escrever`.","tags":["Reservas"],"security":[{"chave":[]},{"oauth":["reservas:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string"},"telefone":{"type":"string"},"email":{"type":"string"},"data":{"type":"string","format":"date","description":"O dia."},"hora":{"type":"string","description":"HH:MM"},"pessoas":{"type":"integer","minimum":1},"ocasiao":{"type":"string","enum":["aniversario","pedido","romantico","reuniao","comemoracao","outra"]},"obs":{"type":"string"},"mesa":{"type":"integer"}},"required":["nome","data","hora","pessoas"]}}}},"responses":{"201":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"reservas:escrever","x-vtx-destrutivo":false}},"/reservas/grade":{"get":{"operationId":"reservas_grade","summary":"Ver a grade de um dia","description":"Os horários de um dia com as reservas e os lugares livres.\n\nPermissão: `reservas:ler`.","tags":["Reservas"],"security":[{"chave":[]},{"oauth":["reservas:ler"]}],"parameters":[{"name":"data","in":"query","required":true,"schema":{"type":"string","format":"date","description":"O dia."},"description":"O dia."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"reservas:ler","x-vtx-destrutivo":false}},"/reservas/{id}/status":{"post":{"operationId":"reserva_status","summary":"Mudar uma reserva","description":"Confirmar, pôr na espera, dar a mesa, marcar que sentou ou que não veio, recusar ou cancelar.\n\nPermissão: `reservas:escrever`.","tags":["Reservas"],"security":[{"chave":[]},{"oauth":["reservas:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da reserva."},"description":"Id da reserva."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["confirmada","espera","mesa","sentou","nao_veio","recusada","cancelada"]},"mesa":{"type":"integer"},"motivo":{"type":"string"}},"required":["status"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"reservas:escrever","x-vtx-destrutivo":false}},"/fila":{"get":{"operationId":"fila_ver","summary":"Ver a fila de espera","description":"Quem está na fila, na ordem, com a previsão.\n\nPermissão: `fila:ler`.","tags":["Fila de espera"],"security":[{"chave":[]},{"oauth":["fila:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"fila:ler","x-vtx-destrutivo":false},"post":{"operationId":"fila_adicionar","summary":"Pôr alguém na fila","description":"A equipe põe um grupo na fila de espera.\n\nPermissão: `fila:escrever`.","tags":["Fila de espera"],"security":[{"chave":[]},{"oauth":["fila:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"nome":{"type":"string"},"pessoas":{"type":"integer","minimum":1},"telefone":{"type":"string"},"email":{"type":"string","description":"Para o aviso da vez por e-mail."}},"required":["nome","pessoas"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"fila:escrever","x-vtx-destrutivo":false}},"/fila/{id}/chamar":{"post":{"operationId":"fila_chamar","summary":"Chamar da fila","description":"Chama o grupo para a mesa (o celular toca).\n\nPermissão: `fila:escrever`.","tags":["Fila de espera"],"security":[{"chave":[]},{"oauth":["fila:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id na fila."},"description":"Id na fila."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mesa":{"type":"integer"}},"required":[]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"fila:escrever","x-vtx-destrutivo":false}},"/fila/{id}/sentar":{"post":{"operationId":"fila_sentar","summary":"Marcar que sentou","description":"O grupo sentou na mesa (o pedido guardado vai para o preparo).\n\nPermissão: `fila:escrever`.","tags":["Fila de espera"],"security":[{"chave":[]},{"oauth":["fila:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id na fila."},"description":"Id na fila."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mesa":{"type":"integer"},"presentes":{"type":"integer","minimum":1}},"required":["mesa","presentes"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"fila:escrever","x-vtx-destrutivo":false}},"/fila/{id}/status":{"post":{"operationId":"fila_status","summary":"Tirar da fila","description":"Desistiu, não veio ou foi para o fim (com o motivo).\n\nPermissão: `fila:escrever`.","tags":["Fila de espera"],"security":[{"chave":[]},{"oauth":["fila:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id na fila."},"description":"Id na fila."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["nao_veio","desistiu","aguardando"]},"motivo":{"type":"string"}},"required":["status"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"fila:escrever","x-vtx-destrutivo":false}},"/prorrogacao":{"get":{"operationId":"prorrogacao_ver","summary":"Ver a Prorrogação","description":"O happy hour agora: se está rodando, o tempo que falta e os chopps somados.\n\nPermissão: `prorrogacao:ler`.","tags":["Prorrogação"],"security":[{"chave":[]},{"oauth":["prorrogacao:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"prorrogacao:ler","x-vtx-destrutivo":false}},"/prorrogacao/comecar":{"post":{"operationId":"prorrogacao_comecar","summary":"Começar a Prorrogação","description":"Começa o happy hour (com os minutos iniciais, opcional).\n\nPermissão: `prorrogacao:escrever`.","tags":["Prorrogação"],"security":[{"chave":[]},{"oauth":["prorrogacao:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"minutos":{"type":"integer","minimum":1}},"required":[]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"prorrogacao:escrever","x-vtx-destrutivo":false}},"/prorrogacao/encerrar":{"post":{"operationId":"prorrogacao_encerrar","summary":"Encerrar a Prorrogação","description":"Encerra o happy hour agora.\n\nPermissão: `prorrogacao:escrever`. **Desfaz algo**: confira antes.","tags":["Prorrogação"],"security":[{"chave":[]},{"oauth":["prorrogacao:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"prorrogacao:escrever","x-vtx-destrutivo":true}},"/prorrogacao/chopps":{"post":{"operationId":"prorrogacao_somar","summary":"Somar chopps","description":"Soma chopps ao relógio (com o nome de quem pediu, opcional).\n\nPermissão: `prorrogacao:escrever`.","tags":["Prorrogação"],"security":[{"chave":[]},{"oauth":["prorrogacao:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"qtd":{"type":"integer","minimum":1,"maximum":20},"nome":{"type":"string"}},"required":["qtd"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"prorrogacao:escrever","x-vtx-destrutivo":false}},"/prorrogacao/desfazer":{"post":{"operationId":"prorrogacao_desfazer","summary":"Desfazer o último chopp","description":"Tira o último chopp somado.\n\nPermissão: `prorrogacao:escrever`.","tags":["Prorrogação"],"security":[{"chave":[]},{"oauth":["prorrogacao:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"prorrogacao:escrever","x-vtx-destrutivo":false}},"/vales":{"get":{"operationId":"vales_listar","summary":"Listar os vales-presente","description":"Os vales vendidos, com o saldo e a situação.\n\nPermissão: `vales:ler`.","tags":["Vales-presente"],"security":[{"chave":[]},{"oauth":["vales:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"vales:ler","x-vtx-destrutivo":false}},"/vales/{codigo}":{"get":{"operationId":"vale_consultar","summary":"Consultar um vale pelo código","description":"O saldo e a validade de um vale.\n\nPermissão: `vales:ler`.","tags":["Vales-presente"],"security":[{"chave":[]},{"oauth":["vales:ler"]}],"parameters":[{"name":"codigo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"vales:ler","x-vtx-destrutivo":false}},"/vales/{codigo}/uso":{"post":{"operationId":"vale_usar","summary":"Usar um vale","description":"Desconta um valor do vale. Use a Idempotency-Key: repetir a mesma chave não desconta de novo.\n\nPermissão: `vales:escrever`.","tags":["Vales-presente"],"security":[{"chave":[]},{"oauth":["vales:escrever"]}],"parameters":[{"name":"codigo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"valor":{"type":"number","description":"Valor a descontar, em reais."}},"required":["valor"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"vales:escrever","x-vtx-destrutivo":false}},"/vales/{id}/confirmar":{"post":{"operationId":"vale_confirmar","summary":"Confirmar o pagamento de um vale","description":"Confirma o Pix recebido de um vale vendido.\n\nPermissão: `vales:escrever`.","tags":["Vales-presente"],"security":[{"chave":[]},{"oauth":["vales:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do vale."},"description":"Id do vale."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"vales:escrever","x-vtx-destrutivo":false}},"/vales/{id}/cancelar":{"post":{"operationId":"vale_cancelar","summary":"Cancelar um vale","description":"Cancela o vale (com o motivo).\n\nPermissão: `vales:escrever`. **Desfaz algo**: confira antes.","tags":["Vales-presente"],"security":[{"chave":[]},{"oauth":["vales:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do vale."},"description":"Id do vale."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"motivo":{"type":"string"}},"required":["motivo"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"vales:escrever","x-vtx-destrutivo":true}},"/vales/{id}/reenviar":{"post":{"operationId":"vale_reenviar","summary":"Reenviar um vale","description":"Manda de novo o e-mail do vale para quem recebe.\n\nPermissão: `vales:escrever`.","tags":["Vales-presente"],"security":[{"chave":[]},{"oauth":["vales:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do vale."},"description":"Id do vale."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"vales:escrever","x-vtx-destrutivo":false}},"/relatorios":{"get":{"operationId":"relatorio","summary":"Relatório de vendas e movimento","description":"O relatório do período (como a aba Relatórios): vendas por dia e por canal, mais vendidos, formas de pagamento, salão, delivery, clube, reservas e vales.\n\nPermissão: `relatorios:ler`.","tags":["Relatórios"],"security":[{"chave":[]},{"oauth":["relatorios:ler"]}],"parameters":[{"name":"de","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Primeiro dia."},"description":"Primeiro dia."},{"name":"ate","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Último dia."},"description":"Último dia."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"relatorios:ler","x-vtx-destrutivo":false}},"/painel/resumo":{"get":{"operationId":"painel_resumo","summary":"Resumo de hoje","description":"O que o topo do painel mostra: mesas, pedidos, chamados e o movimento de hoje.\n\nPermissão: `relatorios:ler`.","tags":["Relatórios"],"security":[{"chave":[]},{"oauth":["relatorios:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"relatorios:ler","x-vtx-destrutivo":false}},"/relatorios/garcons":{"get":{"operationId":"garcons_relatorio","summary":"Relatório dos garçons","description":"Chamados atendidos, tempo de resposta e avaliações de cada garçom.\n\nPermissão: `relatorios:ler`.","tags":["Relatórios"],"security":[{"chave":[]},{"oauth":["relatorios:ler"]}],"parameters":[{"name":"dias","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"relatorios:ler","x-vtx-destrutivo":false}},"/comentarios":{"get":{"operationId":"comentarios_listar","summary":"Listar os comentários","description":"Os comentários e as notas dos clientes, do mais novo para o mais antigo.\n\nPermissão: `comentarios:ler`.","tags":["Comentários"],"security":[{"chave":[]},{"oauth":["comentarios:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"lido","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"desde","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados a partir deste momento (ISO 8601)."},"description":"Só os criados a partir deste momento (ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Só os criados antes deste momento (ISO 8601)."},"description":"Só os criados antes deste momento (ISO 8601)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comentarios:ler","x-vtx-destrutivo":false}},"/comentarios/{id}":{"patch":{"operationId":"comentario_atualizar","summary":"Marcar um comentário como lido","description":"Marca (ou desmarca) como lido.\n\nPermissão: `comentarios:escrever`.","tags":["Comentários"],"security":[{"chave":[]},{"oauth":["comentarios:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do comentário."},"description":"Id do comentário."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"lido":{"type":"boolean"}},"required":["lido"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comentarios:escrever","x-vtx-destrutivo":false}},"/avaliacoes/pratos":{"get":{"operationId":"pratos_avaliacoes_resumo","summary":"Resumo da avaliação por prato","description":"Por prato: vendidos, avaliações, Gostei, aprovação (%), as marcações mais citadas, a tendência das últimas 4 semanas e o selo (mais_pedido ou mais_avaliado). Traz também o resumo do período e os alertas de queda. Sem dado de cliente.\n\nPermissão: `comentarios:ler`.","tags":["Comentários"],"security":[{"chave":[]},{"oauth":["comentarios:ler"]}],"parameters":[{"name":"dias","in":"query","required":false,"schema":{"type":"integer","enum":[7,30,90],"description":"O período (padrão 30)."},"description":"O período (padrão 30)."},{"name":"canal","in":"query","required":false,"schema":{"type":"string","enum":["mesa","comanda","delivery"],"description":"Só de um canal."},"description":"Só de um canal."},{"name":"categoria","in":"query","required":false,"schema":{"type":"string","description":"Só de uma categoria do cardápio (o id ou o nome)."},"description":"Só de uma categoria do cardápio (o id ou o nome)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ dias, minimo, resumo: { total, aprovacao, comMinimo, subiu, caiu }, pratos: [...], alertas: [...], suspeitos: [...] }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comentarios:ler","x-vtx-destrutivo":false}},"/avaliacoes/pratos/lista":{"get":{"operationId":"pratos_avaliacoes_listar","summary":"Listar as avaliações dos pratos","description":"Cada avaliação (Gostei ou Não gostei, as marcações, o texto, o canal e a mesa), da mais nova para a mais antiga. Sem nome, CPF ou contato do cliente.\n\nPermissão: `comentarios:ler`.","tags":["Comentários"],"security":[{"chave":[]},{"oauth":["comentarios:ler"]}],"parameters":[{"name":"dias","in":"query","required":false,"schema":{"type":"integer","enum":[7,30,90],"description":"O período (padrão 30)."},"description":"O período (padrão 30)."},{"name":"canal","in":"query","required":false,"schema":{"type":"string","enum":["mesa","comanda","delivery"]}},{"name":"item_id","in":"query","required":false,"schema":{"type":"string","description":"Só de um prato (o id do cardápio)."},"description":"Só de um prato (o id do cardápio)."},{"name":"so","in":"query","required":false,"schema":{"type":"string","enum":["negativas","positivas","comentario","sem_resposta"],"description":"Só as negativas, as positivas, as com texto ou as que pediram resposta e ainda não têm."},"description":"Só as negativas, as positivas, as com texto ou as que pediram resposta e ainda não têm."},{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (padrão 50)."},"description":"Itens por página (padrão 50)."},{"name":"antes","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"A próxima página: o criado_em do último item da página anterior."},"description":"A próxima página: o criado_em do último item da página anterior."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [{ id, item_id, nome, positivo, tags, comentario, canal, mesa, criado_em, clube, quer_resposta, resposta, respondido_em, oculto_em }], mais }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comentarios:ler","x-vtx-destrutivo":false}},"/avaliacoes/pratos/{id}/responder":{"post":{"operationId":"prato_avaliacao_responder","summary":"Responder a uma avaliação de prato","description":"Só quando o cliente pediu resposta. Até 500 letras; dá para mudar nas primeiras 24 horas. A primeira resposta vai por e-mail ao cliente e aparece no clube dele.\n\nPermissão: `comentarios:escrever`.","tags":["Comentários"],"security":[{"chave":[]},{"oauth":["comentarios:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da avaliação."},"description":"Id da avaliação."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"texto":{"type":"string","maxLength":500,"description":"A resposta."}},"required":["texto"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comentarios:escrever","x-vtx-destrutivo":false}},"/avaliacoes/pratos/{id}/ocultar":{"post":{"operationId":"prato_avaliacao_ocultar","summary":"Ocultar o texto de uma avaliação de prato","description":"Só por abuso (ofensa, dado pessoal ou propaganda), com o motivo. O texto e a foto saem do painel; o Gostei ou Não gostei continua contando na aprovação. Não tem volta.\n\nPermissão: `comentarios:escrever`. **Desfaz algo**: confira antes.","tags":["Comentários"],"security":[{"chave":[]},{"oauth":["comentarios:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da avaliação."},"description":"Id da avaliação."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"motivo":{"type":"string","maxLength":160,"description":"Ofensa, dado pessoal ou propaganda."}},"required":["motivo"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"comentarios:escrever","x-vtx-destrutivo":true}},"/mural":{"get":{"operationId":"mural_listar","summary":"Listar o mural","description":"As fotos do mural (as que esperam aprovação e as publicadas).\n\nPermissão: `mural:ler`.","tags":["Mural"],"security":[{"chave":[]},{"oauth":["mural:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mural:ler","x-vtx-destrutivo":false}},"/mural/{id}/aprovar":{"post":{"operationId":"mural_aprovar","summary":"Aprovar uma foto do mural","description":"Publica a foto no mural.\n\nPermissão: `mural:escrever`.","tags":["Mural"],"security":[{"chave":[]},{"oauth":["mural:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da foto."},"description":"Id da foto."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mural:escrever","x-vtx-destrutivo":false}},"/mural/{id}":{"delete":{"operationId":"mural_tirar","summary":"Tirar uma foto do mural","description":"Tira a foto do mural.\n\nPermissão: `mural:escrever`. **Desfaz algo**: confira antes.","tags":["Mural"],"security":[{"chave":[]},{"oauth":["mural:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da foto."},"description":"Id da foto."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"mural:escrever","x-vtx-destrutivo":true}},"/plaquinhas":{"get":{"operationId":"plaquinhas_listar","summary":"Listar as plaquinhas","description":"As plaquinhas do restaurante e para que é cada uma (mesa, comanda, garçom ou balcão do Match).\n\nPermissão: `plaquinhas:ler`.","tags":["Plaquinhas"],"security":[{"chave":[]},{"oauth":["plaquinhas:ler"]}],"parameters":[{"name":"limite","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Itens por página (1 a 200; padrão 50)."},"description":"Itens por página (1 a 200; padrão 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"O \"proximo\" da página anterior."},"description":"O \"proximo\" da página anterior."},{"name":"mesa","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ itens: [...], proximo: \"cursor\" | null }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"plaquinhas:ler","x-vtx-destrutivo":false}},"/plaquinhas/{codigo}/mesa":{"put":{"operationId":"plaquinha_mesa","summary":"Ligar a plaquinha a uma mesa","description":"Liga a plaquinha (pelo código) à mesa.\n\nPermissão: `plaquinhas:escrever`.","tags":["Plaquinhas"],"security":[{"chave":[]},{"oauth":["plaquinhas:escrever"]}],"parameters":[{"name":"codigo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mesa":{"type":"integer"}},"required":["mesa"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"plaquinhas:escrever","x-vtx-destrutivo":false}},"/plaquinhas/{codigo}/comanda":{"put":{"operationId":"plaquinha_comanda","summary":"Ligar a plaquinha a uma comanda","description":"Liga a plaquinha ao número de comanda.\n\nPermissão: `plaquinhas:escrever`.","tags":["Plaquinhas"],"security":[{"chave":[]},{"oauth":["plaquinhas:escrever"]}],"parameters":[{"name":"codigo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"comanda":{"type":"integer"}},"required":["comanda"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"plaquinhas:escrever","x-vtx-destrutivo":false}},"/plaquinhas/{codigo}/vinculo":{"delete":{"operationId":"plaquinha_desvincular","summary":"Desligar a plaquinha","description":"Tira a plaquinha da mesa ou da comanda.\n\nPermissão: `plaquinhas:escrever`. **Desfaz algo**: confira antes.","tags":["Plaquinhas"],"security":[{"chave":[]},{"oauth":["plaquinhas:escrever"]}],"parameters":[{"name":"codigo","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"plaquinhas:escrever","x-vtx-destrutivo":true}},"/telao/musicas":{"get":{"operationId":"telao_musicas","summary":"Listar os pedidos de música","description":"Os pedidos de música do telão.\n\nPermissão: `telao:ler`.","tags":["Telão"],"security":[{"chave":[]},{"oauth":["telao:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"telao:ler","x-vtx-destrutivo":false}},"/telao/musicas/{id}/status":{"post":{"operationId":"telao_musica_status","summary":"Mudar um pedido de música","description":"Aprovar, tocando agora, tocou ou recusar.\n\nPermissão: `telao:escrever`.","tags":["Telão"],"security":[{"chave":[]},{"oauth":["telao:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id do pedido."},"description":"Id do pedido."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["aprovada","tocando","tocou","recusada"]}},"required":["status"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"telao:escrever","x-vtx-destrutivo":false}},"/avisos/push":{"get":{"operationId":"avisos_push_resumo","summary":"Resumo dos avisos no celular","description":"Quantos clientes recebem os avisos do restaurante no celular e os últimos enviados.\n\nPermissão: `avisos:ler`.","tags":["Avisos no celular"],"security":[{"chave":[]},{"oauth":["avisos:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"avisos:ler","x-vtx-destrutivo":false},"post":{"operationId":"avisos_push_enviar","summary":"Mandar um aviso no celular dos clientes","description":"Manda uma notificação para os clientes que aceitaram os avisos do restaurante (com o limite do painel).\n\nPermissão: `avisos:escrever`.","tags":["Avisos no celular"],"security":[{"chave":[]},{"oauth":["avisos:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"titulo":{"type":"string","description":"Até 50 letras."},"texto":{"type":"string","description":"Até 140 letras."}},"required":["titulo","texto"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"avisos:escrever","x-vtx-destrutivo":false}},"/estoque/insumos":{"get":{"operationId":"estoque_insumos","summary":"Listar os insumos do estoque","description":"Os insumos com o saldo total e por local, o mínimo e a unidade. Os custos vêm só com a permissão custos:ler. Precisa da Gestão liberada para o restaurante.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"busca","in":"query","required":false,"schema":{"type":"string","description":"Parte do nome do insumo."},"description":"Parte do nome do insumo."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/entradas":{"post":{"operationId":"estoque_entrada","summary":"Lançar uma entrada ou um ajuste de estoque","description":"Soma ao estoque uma compra (quantidade positiva, com o custo por unidade) ou faz um ajuste à mão (positivo ou negativo, como uma quebra). Cada item diz o insumo, a quantidade na unidade base (ou na unidade de compra, se informar) e o custo. Responde quantos movimentos gravou.\n\nPermissão: `estoque:escrever`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"tipo":{"type":"string","enum":["compra","ajuste"],"description":"Compra só aceita quantidade positiva."},"local":{"type":"string","format":"uuid","description":"Id do local do estoque; vazio usa o local padrão."},"obs":{"type":"string","description":"Observação, até 200 letras."},"itens":{"type":"array","items":{"type":"object","properties":{"insumo":{"type":"string","format":"uuid","description":"Id do insumo."},"qtd":{"type":"number","description":"Quantidade; no ajuste pode ser negativa."},"unidade":{"type":"string","format":"uuid","description":"Id da unidade de compra do insumo; vazio usa a unidade base."},"custo":{"type":"number","description":"Custo por unidade informada, em reais."}},"required":["insumo","qtd"]},"description":"De 1 a 300 itens."}},"required":["tipo","itens"]}}}},"responses":{"200":{"description":"{ movimentos: 2 }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:escrever","x-vtx-destrutivo":false}},"/estoque/movimentos":{"get":{"operationId":"estoque_movimentos","summary":"Ver os movimentos do estoque","description":"Os últimos movimentos (entradas, vendas, ajustes, perdas), do mais novo para o mais antigo, até 100 por chamada. Para a página seguinte, mande antes_id com o menor id recebido.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"de","in":"query","required":false,"schema":{"type":"string","description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"tipo","in":"query","required":false,"schema":{"type":"string","description":"Tipo do movimento: compra, ajuste, venda, estorno, perda e outros."},"description":"Tipo do movimento: compra, ajuste, venda, estorno, perda e outros."},{"name":"insumo","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Só os movimentos deste insumo."},"description":"Só os movimentos deste insumo."},{"name":"antes_id","in":"query","required":false,"schema":{"type":"integer","description":"Só os movimentos com id menor que este."},"description":"Só os movimentos com id menor que este."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/custos-cardapio":{"get":{"operationId":"estoque_custos_cardapio","summary":"Ver o custo e a margem de cada prato","description":"Para cada prato do cardápio: o preço, o custo pela ficha técnica e a margem. O custo e a margem vêm só com a permissão custos:ler.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/hoje":{"get":{"operationId":"estoque_hoje","summary":"Resumo de hoje do estoque","description":"O que o painel de Estoque mostra no topo: insumos abaixo do mínimo, vendas sem ligação com a ficha, pratos sem ficha, o CMV teórico do período e a última nota de compra.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"dias","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90,"description":"Período do CMV em dias (padrão 7)."},"description":"Período do CMV em dias (padrão 7)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ abaixo_minimo, vendas_sem_ligacao, sem_ficha, cmv, ultima_nota }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/perdas":{"post":{"operationId":"estoque_perda_registrar","summary":"Registrar uma perda ou o consumo da equipe","description":"Tira do estoque o que se perdeu (venceu, estragou, caiu, erro de preparo, cortesia) ou o que a equipe consumiu. Mande o insumo ou o prato (o prato desdobra pela ficha técnica), a quantidade e o motivo. Repetir a mesma chave não registra de novo. O valor da perda vem só com a permissão custos:ler. Precisa da Gestão liberada para o restaurante.\n\nPermissão: `estoque:escrever`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"insumo":{"type":"string","format":"uuid","description":"Id do insumo (ou mande o prato, não os dois)."},"item":{"type":"string","description":"Id do prato do cardápio (ou mande o insumo, não os dois)."},"sel":{"type":"array","items":{"type":"object"},"description":"Opções escolhidas do prato, como no pedido."},"qtd":{"type":"number","description":"Quantidade perdida: na unidade base do insumo (ou na unidade informada) ou em pratos."},"unidade":{"type":"string","format":"uuid","description":"Id da unidade do insumo; vazio usa a unidade base."},"motivo":{"type":"string","enum":["venceu","estragou","caiu","erro_preparo","cortesia","consumo_equipe","outro"],"description":"Por que saiu do estoque."},"obs":{"type":"string","description":"Observação, até 200 letras."},"local":{"type":"string","format":"uuid","description":"Id do local do estoque; vazio usa o local padrão."},"chave":{"type":"string","description":"Chave única da perda (até 80 letras): repetida, devolve o registro de antes sem duplicar."}},"required":["qtd","motivo"]}}}},"responses":{"200":{"description":"{ id, movimentos, valor? }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:escrever","x-vtx-destrutivo":false},"get":{"operationId":"estoque_perdas","summary":"Ver as perdas e o consumo da equipe","description":"As perdas registradas, da mais nova para a mais antiga, até 50 por chamada. Para a página seguinte, mande antes_em com o criado_em da última recebida. O valor vem só com a permissão custos:ler.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"de","in":"query","required":false,"schema":{"type":"string","description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"motivo","in":"query","required":false,"schema":{"type":"string","description":"Só as perdas com este motivo."},"description":"Só as perdas com este motivo."},{"name":"antes_em","in":"query","required":false,"schema":{"type":"string","description":"Só as perdas anteriores a este momento (o criado_em da última da página)."},"description":"Só as perdas anteriores a este momento (o criado_em da última da página)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/producoes":{"get":{"operationId":"estoque_producoes","summary":"Ver as produções das sub-receitas em lote","description":"As produções registradas (o molho, a massa ou outro preparo feito antes das vendas), da mais nova para a mais antiga, até 50 por chamada: a sub-receita, a quantidade, quem produziu, quando e se foi desfeita. Filtre pela sub-receita e pelo período. O custo da produção vem só com a permissão custos:ler. Precisa da Gestão liberada para o restaurante.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"sub","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Só as produções desta sub-receita."},"description":"Só as produções desta sub-receita."},{"name":"de","in":"query","required":false,"schema":{"type":"string","description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false},"post":{"operationId":"estoque_producao_registrar","summary":"Produzir uma sub-receita em lote","description":"Registra que um preparo ficou pronto: os ingredientes da receita saem do estoque e o preparo entra, pelo custo dos ingredientes. A sub-receita precisa estar com \"Produzida em lote\" ligado no painel. A quantidade vai na unidade do preparo (g, ml ou un). Repetir a mesma chave não registra de novo. O custo vem só com a permissão custos:ler. Precisa da Gestão liberada para o restaurante.\n\nPermissão: `estoque:escrever`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"sub":{"type":"string","format":"uuid","description":"Id da sub-receita produzida em lote."},"qtd":{"type":"number","description":"Quanto ficou pronto, na unidade do preparo (de 0,001 a 1.000.000)."},"local":{"type":"string","format":"uuid","description":"Id do local do estoque; vazio usa o local padrão."},"chave":{"type":"string","description":"Chave única da produção (até 80 letras): repetida, devolve o registro de antes sem duplicar."}},"required":["sub","qtd"]}}}},"responses":{"200":{"description":"{ id, qtd, movimentos, custo_total?, ja_registrada? }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:escrever","x-vtx-destrutivo":false}},"/estoque/producoes/{id}/cancelar":{"post":{"operationId":"estoque_producao_cancelar","summary":"Desfazer uma produção","description":"Devolve ao estoque os ingredientes da produção e tira o preparo que ela pôs. O custo médio do preparo não volta ao valor de antes. Desfazer de novo a mesma produção não muda nada.\n\nPermissão: `estoque:escrever`. **Desfaz algo**: confira antes.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:escrever"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Id da produção."},"description":"Id da produção."},{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"responses":{"200":{"description":"{ id, movimentos, ja_cancelada? }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:escrever","x-vtx-destrutivo":true}},"/estoque/contagens":{"get":{"operationId":"estoque_contagens","summary":"Ver as contagens de estoque","description":"As contagens por local, da mais nova para a mais antiga, até 50: o local, quem contou, quantos itens faltaram ou sobraram. A diferença em reais vem só com a permissão custos:ler. Contar é feito no painel, não pela API.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"de","in":"query","required":false,"schema":{"type":"string","description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"local","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Só as contagens deste local."},"description":"Só as contagens deste local."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/sumiu":{"get":{"operationId":"estoque_sumiu","summary":"Ver o que sumiu do estoque","description":"O relatório de quanto saiu a mais ou a menos do que a ficha técnica disse: a diferença das contagens fechadas, as perdas registradas e a saída pelas vendas, por insumo, e as perdas por motivo, por pessoa e por dia da semana. Padrão: os últimos 30 dias. Os valores em reais vêm só com a permissão custos:ler.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"de","in":"query","required":false,"schema":{"type":"string","description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},"description":"Primeiro dia ou momento (AAAA-MM-DD ou ISO 8601)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601); só a data vale o dia inteiro."},"description":"Último dia ou momento (AAAA-MM-DD ou ISO 8601); só a data vale o dia inteiro."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/cmv":{"get":{"operationId":"estoque_cmv","summary":"Ver o CMV real do estoque","description":"O custo do que de fato saiu do estoque num período: o estoque no começo, mais as entradas (compras, entradas à mão e ajustes que somaram), menos o estoque no fim, pelo livro dos movimentos a custo. Ao lado, o CMV teórico (pelas fichas das vendas), as perdas, a diferença das contagens, o resto, a receita do mesmo período e os 20 insumos que mais pesaram. Padrão: o mês corrente até hoje; até um ano. Precisa da permissão custos:ler.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"de","in":"query","required":false,"schema":{"type":"string","description":"Primeiro dia (AAAA-MM-DD)."},"description":"Primeiro dia (AAAA-MM-DD)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","description":"Último dia (AAAA-MM-DD)."},"description":"Último dia (AAAA-MM-DD)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/alertas":{"get":{"operationId":"estoque_alertas","summary":"Ver os alertas do estoque","description":"As contagens que fecharam com a falta igual ou acima do limite da casa (Ajustes do Estoque) e que ninguém marcou como vistas, dos últimos 30 dias: o local, quantos insumos faltaram e quando. O valor em reais e o limite vêm só com a permissão custos:ler.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/compras/sugestao":{"get":{"operationId":"estoque_compras_sugestao","summary":"Ver a sugestão de compra","description":"O que comprar agora: os insumos com mínimo ou máximo cujo saldo, descontado o que deve sair até a entrega (a média dos últimos 28 dias por dia da semana e o prazo do fornecedor da última compra), chega ao mínimo, com a quantidade que falta para o máximo. O preço da última compra vem só com a permissão custos:ler. Precisa das Compras ligadas nos Ajustes do Estoque.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/compras/listas":{"get":{"operationId":"estoque_listas","summary":"Ver as listas de compra","description":"As listas de compra por fornecedor, da mais nova para a mais antiga, até 50: a situação (rascunho, enviada, recebida ou cancelada), como foi enviada e, na enviada, as notas do fornecedor que chegaram depois para conferir. O total estimado vem só com a permissão custos:ler.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["rascunho","enviada","recebida","cancelada"],"description":"Só as listas nesta situação."},"description":"Só as listas nesta situação."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false},"post":{"operationId":"estoque_lista_criar","summary":"Criar uma lista de compra","description":"Cria uma lista de compra em rascunho, para conferir e enviar pelo painel. Cada item é o insumo e a quantidade (na unidade de compra, quando informada). A mesma chave devolve a mesma lista, sem duplicar. Não envia nada ao fornecedor.\n\nPermissão: `estoque:escrever`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"fornecedor":{"type":"string","format":"uuid","description":"O fornecedor da lista."},"itens":{"type":"array","maxItems":200,"items":{"type":"object","properties":{"insumo":{"type":"string","format":"uuid"},"qtd":{"type":"number","exclusiveMinimum":0},"unidade":{"type":"string","format":"uuid","description":"A unidade de compra do insumo; sem ela, a unidade base."}},"required":["insumo","qtd"]}},"obs":{"type":"string","maxLength":300,"description":"Observação para o fornecedor."},"chave":{"type":"string","maxLength":80,"description":"Para repetir sem criar outra lista."}},"required":["itens"]}}}},"responses":{"201":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:escrever","x-vtx-destrutivo":false}},"/estoque/insumos/{insumo}/precos":{"get":{"operationId":"estoque_precos","summary":"Ver o histórico de preço de um insumo","description":"Cada compra do insumo nos últimos dias (padrão 180, até 365), a média dos últimos 90 dias e o último preço de cada fornecedor, na unidade base. Precisa da permissão custos:ler.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"insumo","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"O insumo."},"description":"O insumo."},{"name":"dias","in":"query","required":false,"schema":{"type":"integer","minimum":7,"maximum":365,"description":"Quantos dias para trás (padrão 180)."},"description":"Quantos dias para trás (padrão 180)."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/esgotados":{"get":{"operationId":"estoque_esgotados","summary":"Ver os pratos esgotados pelo estoque","description":"Com \"Esgotar sozinho\" ligado nos Ajustes do Estoque, os pratos que saíram da mesa e do delivery porque um insumo da receita acabou, com o insumo. Voltam sozinhos com a próxima entrada.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/financeiro/lancamentos":{"get":{"operationId":"financeiro_lancamentos","summary":"Ver as contas a pagar e a receber","description":"Os lançamentos do Financeiro pelo vencimento (padrão: do começo do mês passado até o fim do mês que vem), até 500: a descrição, a categoria, o valor, o vencimento, quando foi pago e a situação (em aberto, vencida, paga ou cancelada), e os totais a pagar, vencido, a vencer em 7 dias e a receber. As parcelas das recorrências e as duplicatas das notas de compra entram sozinhas. Precisa do Financeiro ligado.\n\nPermissão: `financeiro:ler`.","tags":["Financeiro"],"security":[{"chave":[]},{"oauth":["financeiro:ler"]}],"parameters":[{"name":"de","in":"query","required":false,"schema":{"type":"string","description":"Primeiro dia do vencimento (AAAA-MM-DD)."},"description":"Primeiro dia do vencimento (AAAA-MM-DD)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","description":"Último dia do vencimento (AAAA-MM-DD)."},"description":"Último dia do vencimento (AAAA-MM-DD)."},{"name":"tipo","in":"query","required":false,"schema":{"type":"string","enum":["pagar","receber"]}},{"name":"situacao","in":"query","required":false,"schema":{"type":"string","enum":["aberto","pago","vencido","cancelado"]}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"financeiro:ler","x-vtx-destrutivo":false},"post":{"operationId":"financeiro_lancamento_criar","summary":"Lançar uma conta a pagar ou a receber","description":"Cria um lançamento no Financeiro: a pagar ou a receber, a descrição, o valor, o vencimento e, se quiser, a categoria, a data em que foi pago, a forma e a repetição (mensal ou semanal, no mesmo dia do vencimento). Só cria; mudar um lançamento é no painel.\n\nPermissão: `financeiro:escrever`.","tags":["Financeiro"],"security":[{"chave":[]},{"oauth":["financeiro:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"tipo":{"type":"string","enum":["pagar","receber"]},"descricao":{"type":"string","maxLength":160},"valor":{"type":"number","exclusiveMinimum":0},"vencimento":{"type":"string","description":"AAAA-MM-DD."},"categoria":{"type":"string","format":"uuid"},"pago_em":{"type":"string","description":"AAAA-MM-DD, se já foi pago."},"forma":{"type":"string","enum":["pix","dinheiro","cartao","boleto","transferencia","outro"]},"obs":{"type":"string","maxLength":300},"recorrencia":{"type":"object","properties":{"frequencia":{"type":"string","enum":["mensal","semanal"]},"fim":{"type":"string","description":"AAAA-MM-DD."}},"required":["frequencia"]}},"required":["tipo","descricao","valor","vencimento"]}}}},"responses":{"201":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"financeiro:escrever","x-vtx-destrutivo":false}},"/financeiro/fluxo":{"get":{"operationId":"financeiro_fluxo","summary":"Ver o fluxo de caixa","description":"Por semana ou por mês: as entradas (as vendas já sem as taxas dos canais e as contas a receber recebidas), as saídas (as contas pagas), o previsto em aberto pelo vencimento, o saldo e o acumulado.\n\nPermissão: `financeiro:ler`.","tags":["Financeiro"],"security":[{"chave":[]},{"oauth":["financeiro:ler"]}],"parameters":[{"name":"agrupar","in":"query","required":false,"schema":{"type":"string","enum":["semana","mes"]}},{"name":"antes","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":12}},{"name":"depois","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":6}},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"financeiro:ler","x-vtx-destrutivo":false}},"/financeiro/dre":{"get":{"operationId":"financeiro_dre","summary":"Ver o DRE do mês","description":"O demonstrativo do mês: a receita bruta por canal, os impostos (a alíquota do Simples), as taxas dos canais, o CMV real do estoque, as despesas variáveis, a margem de contribuição, as despesas fixas, o resultado e o ponto de equilíbrio. Padrão: o mês atual.\n\nPermissão: `financeiro:ler`.","tags":["Financeiro"],"security":[{"chave":[]},{"oauth":["financeiro:ler"]}],"parameters":[{"name":"mes","in":"query","required":false,"schema":{"type":"string","description":"AAAA-MM."},"description":"AAAA-MM."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"financeiro:ler","x-vtx-destrutivo":false}},"/estoque/vendas-pdv":{"get":{"operationId":"estoque_vendas_pdv","summary":"Ver as vendas do PDV que entraram no estoque","description":"As vendas que vieram do caixa (PDV), pela nota de venda ou pela planilha: os últimos 50 envios, com quantas linhas baixaram, ficaram sem ligação, casaram com um pedido do VTX Tap ou ficaram de fora, e as últimas 100 linhas, mais a regra de corte em uso. Filtre pelo período (de, ate) e pela situação. Os valores em reais vêm só com a permissão custos:ler. Precisa da Gestão liberada para o restaurante.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"name":"de","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Primeiro dia (AAAA-MM-DD)."},"description":"Primeiro dia (AAAA-MM-DD)."},{"name":"ate","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Último dia (AAAA-MM-DD)."},"description":"Último dia (AAAA-MM-DD)."},{"name":"situacao","in":"query","required":false,"schema":{"type":"string","enum":["baixada","sem_ligacao","casada","antes","dia_planilha","cancelada"],"description":"Só as linhas nesta situação."},"description":"Só as linhas nesta situação."},{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"{ envios, linhas, aviso }","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/estoque/vendas-sem-receita":{"get":{"operationId":"estoque_vendas_sem_receita","summary":"Ver as vendas sem receita","description":"Os itens vendidos por fora (iFood, 99Food, Keeta e o PDV) que ainda não estão ligados a um prato do cardápio, os mais repetidos primeiro: a origem, o código ou nome, quantas vezes apareceu, a quantidade vendida, a primeira e a última vez e a sugestão de prato pelo nome. Não traz valores em reais. Ligar é feito no painel, não pela API.\n\nPermissão: `estoque:ler`.","tags":["Estoque"],"security":[{"chave":[]},{"oauth":["estoque:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"estoque:ler","x-vtx-destrutivo":false}},"/tv":{"get":{"operationId":"tv_config_ver","summary":"Ver os vídeos e ajustes da TV","description":"A configuração do descanso e os vídeos publicados compatíveis com os recursos da casa. Um vídeo só aparece na TV depois de selecionado. Guarda id e revisao para enviar na seleção.\n\nPermissão: `ajustes:ler`.","tags":["Ajustes"],"security":[{"chave":[]},{"oauth":["ajustes:ler"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"}],"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"ajustes:ler","x-vtx-destrutivo":false},"put":{"operationId":"tv_config_salvar","summary":"Escolher o que aparece no descanso da TV","description":"Salva QR, fotos, vídeos, som e seleção individual. Envie a versao lida no GET: outra gravação exige reler. Cada selecionado inclui id e revisao do vídeo. Vídeos novos nunca entram automaticamente. Só o administrador ou a integração autorizada da casa.\n\nPermissão: `ajustes:escrever`.","tags":["Ajustes"],"security":[{"chave":[]},{"oauth":["ajustes:escrever"]}],"parameters":[{"$ref":"#/components/parameters/Restaurante"},{"$ref":"#/components/parameters/Idempotencia"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"qr":{"type":"boolean","description":"Mostrar QR Code."},"fotos":{"type":"boolean","description":"Mostrar fotos aprovadas do mural na TV."},"videos":{"type":"boolean","description":"Mostrar os vídeos selecionados."},"som":{"type":"boolean","description":"Permitir som após desbloquear o navegador da TV."},"qr_seg":{"type":"integer","minimum":10,"maximum":60,"description":"Segundos do QR entre conteúdos."},"versao":{"type":"integer","minimum":0,"description":"Versão da configuração recebida no GET."},"selecionados":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"revisao":{"type":"integer","minimum":1}},"required":["id","revisao"]},"description":"Lista explícita de vídeos escolhidos, vazia para nenhum."}},"required":["qr","fotos","videos","som","qr_seg","versao","selecionados"]}}}},"responses":{"200":{"description":"O resultado, como o painel recebe.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/Sobra"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Erro"},"401":{"$ref":"#/components/responses/Erro"},"403":{"$ref":"#/components/responses/Erro"},"404":{"$ref":"#/components/responses/Erro"},"409":{"$ref":"#/components/responses/Erro"},"412":{"$ref":"#/components/responses/Erro"},"422":{"$ref":"#/components/responses/Erro"},"428":{"$ref":"#/components/responses/Erro"},"429":{"$ref":"#/components/responses/Erro"}},"x-vtx-escopo":"ajustes:escrever","x-vtx-destrutivo":false}}},"components":{"securitySchemes":{"chave":{"type":"http","scheme":"bearer","bearerFormat":"vtx_...","description":"A chave criada no painel (Ajustes › API) ou no portal da rede."},"oauth":{"type":"oauth2","description":"O conector (Claude, ChatGPT e outros clientes MCP).","flows":{"authorizationCode":{"authorizationUrl":"https://tap.vortexsystems.tech/oauth/authorize","tokenUrl":"https://tap.vortexsystems.tech/oauth/token","refreshUrl":"https://tap.vortexsystems.tech/oauth/token","scopes":{"cardapio:ler":"Ler: Cardápio","cardapio:escrever":"Ler e mudar: Cardápio","ajustes:ler":"Ler: Ajustes","ajustes:escrever":"Ler e mudar: Ajustes","pedidos:ler":"Ler: Pedidos","pedidos:escrever":"Ler e mudar: Pedidos","comandas:ler":"Ler: Comandas","comandas:escrever":"Ler e mudar: Comandas","mesas:ler":"Ler: Mesas e salão","mesas:escrever":"Ler e mudar: Mesas e salão","chamados:ler":"Ler: Chamados","chamados:escrever":"Ler e mudar: Chamados","clube:ler":"Ler: Clube de fidelidade","clube:escrever":"Ler e mudar: Clube de fidelidade","reservas:ler":"Ler: Reservas","reservas:escrever":"Ler e mudar: Reservas","fila:ler":"Ler: Fila de espera","fila:escrever":"Ler e mudar: Fila de espera","prorrogacao:ler":"Ler: Prorrogação","prorrogacao:escrever":"Ler e mudar: Prorrogação","vales:ler":"Ler: Vales-presente","vales:escrever":"Ler e mudar: Vales-presente","relatorios:ler":"Ler: Relatórios","comentarios:ler":"Ler: Comentários","comentarios:escrever":"Ler e mudar: Comentários","mural:ler":"Ler: Mural","mural:escrever":"Ler e mudar: Mural","plaquinhas:ler":"Ler: Plaquinhas","plaquinhas:escrever":"Ler e mudar: Plaquinhas","telao:ler":"Ler: Telão","telao:escrever":"Ler e mudar: Telão","avisos:ler":"Ler: Avisos no celular","avisos:escrever":"Ler e mudar: Avisos no celular","estoque:ler":"Ler: Estoque","estoque:escrever":"Ler e mudar: Estoque","custos:ler":"Ler: Custos e valores do estoque","financeiro:ler":"Ler: Financeiro","financeiro:escrever":"Ler e mudar: Financeiro","caixa:ler":"Ler: Caixa e pagamentos","caixa:escrever":"Ler e mudar: Caixa e pagamentos"}}}}},"parameters":{"Restaurante":{"name":"VTX-Restaurante","in":"header","required":false,"schema":{"type":"string"},"description":"Só com a chave da rede: o endereço (ou o id) da unidade."},"Idempotencia":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Uma chave sua para o pedido (um UUID). Repetir o mesmo pedido com a mesma chave em 24 horas devolve a mesma resposta, sem fazer de novo."},"IfMatch":{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"O ETag da leitura. Se a versão mudou, a resposta é 412."}},"headers":{"Sobra":{"schema":{"type":"integer"},"description":"Quantas chamadas sobram no minuto."}},"responses":{"Erro":{"description":"O erro, no formato problem+json (RFC 9457).","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"codigo":{"type":"string"},"requisicao":{"type":"string"}}}}}}}}}