{"openapi":"3.1.0","info":{"title":"API Admin da Denaryx","version":"2026-10","description":"A API das integrações de uma loja: ERPs, o CLI de temas e automações. O token diz a loja. Campos em inglês, valores em dinheiro em centavos, datas em ISO 8601 (UTC). As mensagens de erro são em português; os códigos, em inglês."},"servers":[{"url":"https://api.denaryx.com/admin/2026-10"}],"security":[{"token":[]}],"paths":{"/token":{"get":{"operationId":"getToken","summary":"O token que faz a chamada","description":"A integração, o token, os escopos marcados no painel, a versão e o limite de chamadas. Serve para conferir a configuração antes de começar. Com o token de uma sessão do CLI (o login pela conta da pessoa), integration vem null, session traz o aparelho e user a pessoa, e os escopos são os que o papel dela na loja dá agora.\n\nQualquer token da loja.","x-denaryx-scopes":[],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/shop":{"get":{"operationId":"getShop","summary":"A loja do token","description":"O nome, os endereços, a moeda e o fuso da loja. Os valores em dinheiro da API são inteiros em centavos da moeda da loja.\n\nQualquer token da loja.","x-denaryx-scopes":[],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shop"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes":{"get":{"operationId":"listThemes","summary":"Os temas da biblioteca da loja","description":"Todos os temas da biblioteca (no máximo 20), o publicado primeiro. Cabem numa página só. Os temas de desenvolvimento do CLI (denaryx tema dev) ficam de fora, a menos do development.\n\nEscopo: `read_themes`.","x-denaryx-scopes":["read_themes"],"parameters":[{"name":"development","in":"query","required":false,"description":"only: só os temas de desenvolvimento do CLI; include: a biblioteca e eles. Sem o parâmetro, só a biblioteca.","schema":{"type":"string","enum":["only","include"]}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeList"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createTheme","summary":"Acrescenta um tema à biblioteca","description":"Um tema da plataforma (source: platform), a cópia de um tema da biblioteca (duplicate) ou o fork de um tema da plataforma, com o código inteiro na loja para gravar os arquivos (fork). A vitrine não muda: o tema vai ao ar só quando é publicado.\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Theme"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/import":{"post":{"operationId":"importTheme","summary":"Cria um tema a partir de um zip","description":"O zip de um tema (até 50 MB, 2.000 arquivos) vira um tema novo na biblioteca, com o código da loja. O que não é da estrutura de um tema fica de fora e volta em ignored. Com development=true, nasce um tema de desenvolvimento do CLI: fora dos 20 da biblioteca (até 5 por integração e 30 por loja; acima disso, 409 development_theme_limit), com o conteúdo do tema content_from lido pelo código novo, nunca publicado e apagado depois de 7 dias sem gravação.\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"O zip do tema.","type":"string","contentMediaType":"application/octet-stream"},"name":{"description":"O nome do tema novo.","type":"string"},"development":{"description":"true: um tema de desenvolvimento do CLI, fora da biblioteca. No tema de desenvolvimento, o nome que já existe ganha um número.","type":"string"},"content_from":{"description":"Só com development=true: o id do tema da loja de onde vem o conteúdo (as seções e os ajustes montados no editor). Sem ele, o padrão do tema enviado.","type":"string"}},"required":["file"]}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeImport"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}":{"get":{"operationId":"getTheme","summary":"Um tema","description":"Um tema da biblioteca.\n\nEscopo: `read_themes`.","x-denaryx-scopes":["read_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Theme"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateTheme","summary":"Renomeia um tema","description":"O nome não se repete na loja.\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Theme"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteTheme","summary":"Exclui um tema","description":"O tema publicado, ou com publicação agendada, não sai (409). As publicações antigas dele continuam no painel.\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/files":{"get":{"operationId":"listThemeFiles","summary":"Os arquivos de um tema","description":"A lista dos arquivos, com o checksum de cada um (a base da gravação) e os problemas da conferência do código. Os de um tema da plataforma vêm só para leitura (read_only).\n\nEscopo: `read_themes`.","x-denaryx-scopes":["read_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeFiles"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"put":{"operationId":"writeThemeFiles","summary":"Grava arquivos de texto, tudo ou nada","description":"Grava, apaga e move vários arquivos de uma vez. Cada um diz a base, o checksum lido (null para arquivo novo): se algum mudou desde a leitura, nada é gravado e a resposta é 409 file_conflict, com os conflitos. O corpo tem no máximo 1 MB: mande em partes. O tema conectado a uma branch do GitHub tem o código só para leitura: 409 theme_connected (o código muda pelo git push).\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeFilesWrite"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeFiles"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/files/content":{"get":{"operationId":"getThemeFile","summary":"O conteúdo de um arquivo","description":"O texto do arquivo, ou o url na CDN de uma imagem, fonte ou vídeo.\n\nEscopo: `read_themes`.","x-denaryx-scopes":["read_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"name":"path","in":"query","required":true,"description":"O caminho do arquivo, como templates/index.json.","schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeFileContent"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/assets":{"post":{"operationId":"uploadThemeAssets","summary":"Envia arquivos para assets/","description":"Imagens, fontes, vídeos e também CSS e JS, até 20 por chamada e 10 MB cada, gravados em assets/<nome do arquivo>. Com as bases, o envio confere os checksums como a gravação; sem elas, o arquivo com o mesmo nome é substituído. O tema conectado a uma branch do GitHub tem o código só para leitura: 409 theme_connected (o código muda pelo git push).\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"description":"Os arquivos.","type":"array","items":{"type":"string","contentMediaType":"application/octet-stream"},"maxItems":20},"bases":{"description":"Opcional, em JSON: { \"assets/logo.png\": \"<checksum lido>\" | null }.","type":"string"}},"required":["files"]}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeFiles"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/versions":{"get":{"operationId":"listThemeVersions","summary":"As versões do código","description":"As versões guardadas do código de um tema da loja, da mais nova à mais antiga: a cada publicação que mudou o código, a cada envio de zip (e a cada push numa branch do GitHub conectada ao tema, também com reason import e a nota com o commit), antes de restaurar e as salvas à mão.\n\nEscopo: `read_themes`.","x-denaryx-scopes":["read_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeVersionList"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createThemeVersion","summary":"Guarda o código de agora como versão","description":"Uma versão com o código em trabalho, com uma nota opcional.\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeVersionCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeVersion"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/versions/{version_id}/restore":{"post":{"operationId":"restoreThemeVersion","summary":"Volta o código a uma versão","description":"O código da versão volta a ser o trabalho do tema; o de antes vira uma versão. O conteúdo da loja e a vitrine não mudam. O tema conectado a uma branch do GitHub tem o código só para leitura: 409 theme_connected (o código muda pelo git push).\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"name":"version_id","in":"path","required":true,"description":"O id da versão.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeFiles"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/import":{"post":{"operationId":"importThemeFiles","summary":"Troca os arquivos de um tema pelos de um zip","description":"Os arquivos do zip substituem os do tema; o código de antes vira uma versão, e o conteúdo da loja fica. O tema conectado a uma branch do GitHub tem o código só para leitura: 409 theme_connected (o código muda pelo git push).\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"O zip do tema.","type":"string","contentMediaType":"application/octet-stream"}},"required":["file"]}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeImport"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/export":{"get":{"operationId":"exportTheme","summary":"O zip do código de um tema","description":"Os arquivos de um tema da loja em zip, sem o conteúdo da loja.\n\nEscopo: `read_themes`.","x-denaryx-scopes":["read_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso: o zip.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/zip":{"schema":{"type":"string","contentMediaType":"application/zip"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/previews":{"post":{"operationId":"createThemePreview","summary":"Uma prévia do tema na vitrine","description":"A temporária (60 minutos, acompanha o trabalho) ou um link para mandar ao cliente, com nome, validade e, se congelado, o código e o conteúdo de agora. O endereço aparece só nesta resposta.\n\nEscopo: `write_themes`.","x-denaryx-scopes":["write_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemePreviewCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemePreview"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/check":{"get":{"operationId":"checkTheme","summary":"O que muda se o tema for publicado","description":"Os problemas do código (com erro, não publica), o conteúdo da loja que o código deixa de ler, os modelos de página que faltam e o que está no ar.\n\nEscopo: `read_themes`.","x-denaryx-scopes":["read_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeCheck"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/themes/{id}/publish":{"post":{"operationId":"publishTheme","summary":"Publica o tema","description":"O tema vai para a vitrine, com o código e o conteúdo de agora, e o painel guarda a publicação para voltar a ela. Código com erro não vai ao ar (422 theme_has_errors, com os problemas), e o tema de desenvolvimento do CLI nunca vai (409 development_theme). A vitrine mostra a mudança em até 60 segundos.\n\nEscopo: `publish_themes`.","x-denaryx-scopes":["publish_themes"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do tema.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemePublish"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Theme"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products":{"get":{"operationId":"listProducts","summary":"Os produtos da loja","description":"Na ordem da última mudança, da mais antiga à mais nova, com o id para desempatar: para sincronizar, guarde o updated_at do último que leu e peça updated_at_min na próxima vez. A mudança de estoque de uma variante (um pedido, um ajuste) muda só o updated_at dela, e não o do produto: para o estoque, ver GET /variants.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Quantos itens por página, de 1 a 100 (50 sem ele).","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"O next_cursor da página anterior, como veio. Os filtros continuam os mesmos.","schema":{"type":"string","maxLength":200}},{"name":"ids","in":"query","required":false,"description":"Só estes ids, separados por vírgula (até 100).","schema":{"type":"string"}},{"name":"updated_at_min","in":"query","required":false,"description":"Só o que mudou a partir desta data (ISO 8601): a sincronização incremental.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_min","in":"query","required":false,"description":"Só o criado a partir desta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_max","in":"query","required":false,"description":"Só o criado até esta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"active","in":"query","required":false,"description":"true: só os à venda; false: só os ocultos.","schema":{"type":"string","enum":["true","false"]}},{"name":"collection_id","in":"query","required":false,"description":"Só os produtos da coleção e das coleções de baixo dela.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createProduct","summary":"Cria um produto","description":"Com as variantes (de 1 a 100). Sem handle, o endereço sai do título. Um produto à venda nas coleções que pedem atributos obrigatórios precisa deles em specifications. O SKU, o código de barras e o handle não se repetem na loja (409).\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/count":{"get":{"operationId":"countProducts","summary":"Quantos produtos casam com os filtros","description":"Os mesmos filtros da lista.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"parameters":[{"name":"ids","in":"query","required":false,"description":"Só estes ids, separados por vírgula (até 100).","schema":{"type":"string"}},{"name":"updated_at_min","in":"query","required":false,"description":"Só o que mudou a partir desta data (ISO 8601): a sincronização incremental.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_min","in":"query","required":false,"description":"Só o criado a partir desta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_max","in":"query","required":false,"description":"Só o criado até esta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"active","in":"query","required":false,"description":"true: só os à venda; false: só os ocultos.","schema":{"type":"string","enum":["true","false"]}},{"name":"collection_id","in":"query","required":false,"description":"Só os produtos da coleção e das coleções de baixo dela.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Count"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/{id}":{"get":{"operationId":"getProduct","summary":"Um produto","description":"O produto, com as variantes e as fotos.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateProduct","summary":"Muda campos de um produto","description":"Só o que vier muda. As variantes ficam como estão: elas mudam pelas rotas delas e pelos lotes de estoque e de preço. As listas (options, collection_ids, specifications) trocam a anterior inteira. Com write_content, só os textos: title, description, seo e handle (o endereço antigo leva ao novo); qualquer outro campo dá 403 missing_scope, com os campos que pedem write_products em fields.\n\nEscopo: `write_products` ou `write_content`.","x-denaryx-scopes":["write_products","write_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"202":{"description":"A integração está em modo proposta: nada mudou na loja. A proposta espera alguém da equipe aprovar em \"Sugestões dos agentes\"; acompanhe em GET /proposals/{id}.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteProduct","summary":"Exclui um produto","description":"Com as variantes e as fotos. Os pedidos já feitos continuam com o nome e o preço da compra.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/{id}/variants":{"post":{"operationId":"createVariant","summary":"Acrescenta uma variante","description":"No fim da lista do produto, com um valor para cada opção dele. A combinação de valores não se repete no produto.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/{id}/variants/{variant_id}":{"patch":{"operationId":"updateVariant","summary":"Muda campos de uma variante","description":"Só o que vier muda. inventory_quantity grava o número absoluto: com pedidos acontecendo, prefira POST /inventory/adjust.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"name":"variant_id","in":"path","required":true,"description":"O id da variante.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteVariant","summary":"Exclui uma variante","description":"O produto fica com as outras. A única variante não sai: exclua o produto.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"name":"variant_id","in":"path","required":true,"description":"O id da variante.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/variants":{"get":{"operationId":"listVariants","summary":"As variantes da loja","description":"Na ordem da última mudança, como a lista de produtos: é por aqui que se sincroniza o estoque e o preço (updated_at_min). Com sku, acha a variante pelo SKU.\n\nEscopo: `read_products`.","x-denaryx-scopes":["read_products"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Quantos itens por página, de 1 a 100 (50 sem ele).","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"O next_cursor da página anterior, como veio. Os filtros continuam os mesmos.","schema":{"type":"string","maxLength":200}},{"name":"ids","in":"query","required":false,"description":"Só estes ids, separados por vírgula (até 100).","schema":{"type":"string"}},{"name":"sku","in":"query","required":false,"description":"A variante com este SKU (exato).","schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"product_id","in":"query","required":false,"description":"Só as variantes deste produto.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"updated_at_min","in":"query","required":false,"description":"Só o que mudou a partir desta data (ISO 8601): a sincronização incremental.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/{id}/images":{"post":{"operationId":"createProductImage","summary":"Acrescenta uma foto","description":"O arquivo (JPEG, PNG ou WebP, até 10 MB) num multipart, ou, em JSON, o endereço https de onde a API baixa a foto. A foto entra no fim da lista, em WebP, em dois tamanhos. Um produto tem até 10 fotos. O endereço precisa ser público: a API não busca endereços internos nem segue mais de 3 redirecionamentos.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"A foto.","type":"string","contentMediaType":"application/octet-stream"},"alt":{"description":"O texto da foto (até 125 caracteres).","type":"string"}},"required":["file"]}},"application/json":{"schema":{"$ref":"#/components/schemas/ProductImageFromUrl"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImage"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/{id}/images/{image_id}":{"patch":{"operationId":"updateProductImage","summary":"Muda o texto de uma foto","description":"O texto alternativo (alt), que os buscadores e os leitores de tela leem. Vazio, a vitrine usa o nome do produto. O arquivo e a ordem não mudam por aqui.\n\nEscopo: `write_products` ou `write_content`.","x-denaryx-scopes":["write_products","write_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"name":"image_id","in":"path","required":true,"description":"O id da foto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImageUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImage"}}}},"202":{"description":"A integração está em modo proposta: nada mudou na loja. A proposta espera alguém da equipe aprovar em \"Sugestões dos agentes\"; acompanhe em GET /proposals/{id}.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteProductImage","summary":"Exclui uma foto","description":"As outras fotos sobem uma posição.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"name":"image_id","in":"path","required":true,"description":"O id da foto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/{id}/try_on":{"get":{"operationId":"getProductTryOn","summary":"O provador virtual do produto","description":"O arquivo do produto, que vale para as variantes sem um próprio (null, sem arquivo), e as variantes que têm o delas.\n\nEscopo: `read_products`.","x-denaryx-scopes":["read_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTryOn"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"put":{"operationId":"setProductTryOn","summary":"Grava o provador virtual do produto","description":"Os arquivos vão por endereço https público, e a API baixa e processa cada um, como no painel: no 2d, a frente (front_url) e o lado (side_url, opcional), em PNG com o fundo transparente, até 10 MB; no 3d, o GLB (model_url), até 8 MB. type e width_mm sempre. Sem arquivo novo, fica o gravado do mesmo tipo: a largura e os ajustes mudam sem reenviar. Os ajustes que não vierem ficam como estavam (no arquivo novo, os padrões). side_url null tira o lado. A foto que não serve (sem transparência, pequena demais) e o GLB recusado dão 422 try_on_rejected, com o motivo.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryOnUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTryOn"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteProductTryOn","summary":"Tira o provador virtual do produto","description":"Os arquivos saem. Na variante, ela volta a usar o arquivo do produto. Sem arquivo, 404.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/products/{id}/variants/{variant_id}/try_on":{"get":{"operationId":"getVariantTryOn","summary":"O provador virtual da variante","description":"O arquivo próprio da variante (a cor). null: a variante usa o do produto.\n\nEscopo: `read_products`.","x-denaryx-scopes":["read_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"name":"variant_id","in":"path","required":true,"description":"O id da variante.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantTryOn"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"put":{"operationId":"setVariantTryOn","summary":"Grava o provador virtual da variante","description":"Os arquivos vão por endereço https público, e a API baixa e processa cada um, como no painel: no 2d, a frente (front_url) e o lado (side_url, opcional), em PNG com o fundo transparente, até 10 MB; no 3d, o GLB (model_url), até 8 MB. type e width_mm sempre. Sem arquivo novo, fica o gravado do mesmo tipo: a largura e os ajustes mudam sem reenviar. Os ajustes que não vierem ficam como estavam (no arquivo novo, os padrões). side_url null tira o lado. A foto que não serve (sem transparência, pequena demais) e o GLB recusado dão 422 try_on_rejected, com o motivo.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"name":"variant_id","in":"path","required":true,"description":"O id da variante.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryOnUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantTryOn"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteVariantTryOn","summary":"Tira o provador virtual da variante","description":"Os arquivos saem. Na variante, ela volta a usar o arquivo do produto. Sem arquivo, 404.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do produto.","schema":{"type":"string","format":"uuid"}},{"name":"variant_id","in":"path","required":true,"description":"O id da variante.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/inventory/adjust":{"post":{"operationId":"adjustInventory","summary":"Soma ao estoque, em lote","description":"Cada item soma o delta (negativo, subtrai) ao estoque de agora, sem ler antes: o jeito seguro com pedidos acontecendo. Até 100 itens, pelo variant_id ou pelo sku, tudo ou nada: se algum ficaria abaixo de zero, nada muda (409 insufficient_inventory, com o item em fields). A variante de produto sem controle de estoque (inventory_tracked falso) recusa o lote (422 inventory_not_tracked).\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryAdjust"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/inventory/set":{"post":{"operationId":"setInventory","summary":"Grava o estoque, em lote","description":"O estoque de cada item passa a ser o número mandado: o que está à venda, depois dos pedidos já feitos. Até 100 itens, tudo ou nada. A variante de produto sem controle de estoque (inventory_tracked falso) recusa o lote (422 inventory_not_tracked).\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySet"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/prices/set":{"post":{"operationId":"setPrices","summary":"Grava preços, em lote","description":"O preço, o \"de\" (compare_at_price; null tira a promoção) e o custo de cada item, só os que vierem. O \"de\" precisa ser maior que o preço. Até 100 itens, tudo ou nada. As promoções da loja continuam valendo sobre o preço novo.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceSet"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/collections":{"get":{"operationId":"listCollections","summary":"As coleções da loja","description":"As categorias da loja, em árvore, numa lista plana na ordem do menu: cada coleção seguida das de baixo dela. Todas (no máximo 2.000) cabem numa página só.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionList"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createCollection","summary":"Cria uma coleção","description":"No fim das coleções do mesmo lugar da árvore (até 3 níveis). Sem handle, o endereço sai do título.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionWithContent"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/collections/{id}":{"get":{"operationId":"getCollection","summary":"Uma coleção","description":"Com o texto da página e o título e a descrição para os buscadores.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da coleção.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionWithContent"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateCollection","summary":"Muda campos de uma coleção","description":"Só o que vier muda. Um parent_id novo move a coleção, com as de baixo, para o fim do lugar novo; o endereço antigo leva ao novo. Com write_content, só os textos: title, description, seo e handle; qualquer outro campo dá 403 missing_scope, com os campos que pedem write_products em fields.\n\nEscopo: `write_products` ou `write_content`.","x-denaryx-scopes":["write_products","write_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da coleção.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionWithContent"}}}},"202":{"description":"A integração está em modo proposta: nada mudou na loja. A proposta espera alguém da equipe aprovar em \"Sugestões dos agentes\"; acompanhe em GET /proposals/{id}.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteCollection","summary":"Exclui uma coleção","description":"Os produtos saem dela e continuam nas outras. A coleção com outras debaixo dela não sai (409).\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da coleção.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/brands":{"get":{"operationId":"listBrands","summary":"As marcas da loja","description":"Todas (no máximo 2.000), em ordem de nome, numa página só.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandList"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createBrand","summary":"Cria uma marca","description":"Sem handle, o endereço sai do nome. O logo se envia pelo painel.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/brands/{id}":{"get":{"operationId":"getBrand","summary":"Uma marca","description":"A marca, com quantos produtos são dela.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da marca.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateBrand","summary":"Muda campos de uma marca","description":"Só o que vier muda; o logo fica. Um handle novo leva o endereço antigo ao novo. Todos os campos da marca são texto: write_content basta.\n\nEscopo: `write_products` ou `write_content`.","x-denaryx-scopes":["write_products","write_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da marca.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"202":{"description":"A integração está em modo proposta: nada mudou na loja. A proposta espera alguém da equipe aprovar em \"Sugestões dos agentes\"; acompanhe em GET /proposals/{id}.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteBrand","summary":"Exclui uma marca","description":"Os produtos dela ficam sem marca.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da marca.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/assemblies":{"get":{"operationId":"listAssemblies","summary":"As montagens da loja","description":"Os grupos de complementos dos produtos (a lente e os tratamentos da armação). Todas (no máximo 50), em ordem de nome, numa página só.\n\nEscopo: `read_products`.","x-denaryx-scopes":["read_products"],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssemblyList"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createAssembly","summary":"Cria uma montagem","description":"Com os grupos (até 8, cada um com até 30 produtos) e as coleções e os produtos aos quais ela se aplica. Uma coleção ou um produto que já usa outra montagem é recusado (409 assembly_already_linked).\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssemblyCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assembly"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/assemblies/{id}":{"get":{"operationId":"getAssembly","summary":"Uma montagem","description":"Com os grupos e as ligações; optional diz se o produto também vai sem a montagem, e incomplete, que algum grupo obrigatório ficou sem produto à venda.\n\nEscopo: `read_products`.","x-denaryx-scopes":["read_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da montagem.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assembly"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateAssembly","summary":"Muda campos de uma montagem","description":"Só o que vier muda; as listas (groups, collection_ids, product_ids) trocam a anterior inteira.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da montagem.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssemblyUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assembly"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteAssembly","summary":"Exclui uma montagem","description":"As coleções e os produtos ligados a ela ficam sem montagem; os produtos dos grupos continuam no catálogo.\n\nEscopo: `write_products`.","x-denaryx-scopes":["write_products"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da montagem.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/pages":{"get":{"operationId":"listPages","summary":"As páginas da loja","description":"As páginas institucionais (\"Sobre\", \"Trocas e devoluções\"), na ordem do rodapé, sem o texto: ele vem em GET /pages/{id}. Todas (no máximo 50) cabem numa página só.\n\nEscopo: `read_content`.","x-denaryx-scopes":["read_content"],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageList"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createPage","summary":"Cria uma página","description":"No fim do rodapé. Sem handle, o endereço sai do título. A página nasce fora do ar (published false): publique com o PATCH, depois de conferir. Uma loja tem até 50 páginas.\n\nEscopo: `write_content`.","x-denaryx-scopes":["write_content"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"202":{"description":"A integração está em modo proposta: nada mudou na loja. A proposta espera alguém da equipe aprovar em \"Sugestões dos agentes\"; acompanhe em GET /proposals/{id}.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/pages/{id}":{"get":{"operationId":"getPage","summary":"Uma página","description":"Com o texto, no Markdown pequeno da vitrine, e o título e a descrição para os buscadores.\n\nEscopo: `read_content`.","x-denaryx-scopes":["read_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da página.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updatePage","summary":"Muda campos de uma página","description":"Só o que vier muda; seo muda campo a campo. Um handle novo leva o endereço antigo ao novo. published true põe a página na vitrine e no rodapé.\n\nEscopo: `write_content`.","x-denaryx-scopes":["write_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da página.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"202":{"description":"A integração está em modo proposta: nada mudou na loja. A proposta espera alguém da equipe aprovar em \"Sugestões dos agentes\"; acompanhe em GET /proposals/{id}.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/proposals":{"get":{"operationId":"listProposals","summary":"As propostas desta integração","description":"Numa integração em modo proposta (approval_mode \"proposal\" em GET /token), as escritas de texto (PATCH de produto, foto, coleção, marca e página, e POST /pages) respondem 202 com uma proposta, e nada muda na loja até alguém da equipe aprovar em \"Sugestões dos agentes\", no painel. Aqui você acompanha: pendente, aprovada (com o change_id da mudança no histórico), recusada (com o motivo, quando o lojista escreveu), em conflito (o valor de base mudou antes da aprovação: o valor de agora vem em conflict) ou expirada (ninguém decidiu em 7 dias). Da mais nova para a mais velha.\n\nEscopo: `write_products` ou `write_content`.","x-denaryx-scopes":["write_products","write_content"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Quantos itens por página, de 1 a 100 (50 sem ele).","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"O next_cursor da página anterior, como veio. Os filtros continuam os mesmos.","schema":{"type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"description":"Só as que estão nesta situação.","schema":{"type":"string","enum":["pending","approved","rejected","conflict","expired"]}},{"name":"batch_id","in":"query","required":false,"description":"Só as da mesma chamada.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/proposals/{id}":{"get":{"operationId":"getProposal","summary":"Uma proposta","description":"A proposta desta integração, com os campos (o before é o valor de base, que a aprovação confere), a situação e, decidida, quando e como.\n\nEscopo: `write_products` ou `write_content`.","x-denaryx-scopes":["write_products","write_content"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da proposta.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders":{"get":{"operationId":"listOrders","summary":"Os pedidos da loja","description":"Na ordem da última mudança, da mais antiga à mais nova, com o id para desempatar: para sincronizar, guarde o updated_at do último que leu e peça updated_at_min na próxima vez. Toda mudança do pedido conta: a situação, o pagamento confirmado, o rastreio, a nota fiscal e a anonimização. Cada pedido traz os dados de quem comprou.\n\nEscopo: `read_orders`.","x-denaryx-scopes":["read_orders"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Quantos itens por página, de 1 a 100 (50 sem ele).","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"O next_cursor da página anterior, como veio. Os filtros continuam os mesmos.","schema":{"type":"string","maxLength":200}},{"name":"ids","in":"query","required":false,"description":"Só estes ids, separados por vírgula (até 100).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Só os pedidos nesta situação.","schema":{"type":"string","enum":["pending_payment","paid","preparing","shipped","delivered","cancelled"]}},{"name":"updated_at_min","in":"query","required":false,"description":"Só o que mudou a partir desta data (ISO 8601): a sincronização incremental.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_min","in":"query","required":false,"description":"Só o criado a partir desta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_max","in":"query","required":false,"description":"Só o criado até esta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/count":{"get":{"operationId":"countOrders","summary":"Quantos pedidos casam com os filtros","description":"Os mesmos filtros da lista.\n\nEscopo: `read_orders`.","x-denaryx-scopes":["read_orders"],"parameters":[{"name":"ids","in":"query","required":false,"description":"Só estes ids, separados por vírgula (até 100).","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Só os pedidos nesta situação.","schema":{"type":"string","enum":["pending_payment","paid","preparing","shipped","delivered","cancelled"]}},{"name":"updated_at_min","in":"query","required":false,"description":"Só o que mudou a partir desta data (ISO 8601): a sincronização incremental.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_min","in":"query","required":false,"description":"Só o criado a partir desta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_max","in":"query","required":false,"description":"Só o criado até esta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Count"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}":{"get":{"operationId":"getOrder","summary":"Um pedido","description":"O pedido, com os itens, os valores, o frete, a última cobrança, a nota fiscal e os dados de quem comprou.\n\nEscopo: `read_orders`.","x-denaryx-scopes":["read_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/mark_paid":{"post":{"operationId":"markOrderPaid","summary":"Marca o pedido como pago","description":"Para o pagamento recebido fora da plataforma (depósito, dinheiro na retirada). Só o pedido que aguarda pagamento; quem comprou recebe o e-mail de pagamento confirmado. O pagamento feito pelo checkout já chega pago, pelo gateway.\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/prepare":{"post":{"operationId":"prepareOrder","summary":"Começa a separar o pedido","description":"Só o pedido pago.\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/ship":{"post":{"operationId":"shipOrder","summary":"Marca o pedido como enviado","description":"Só o pedido em separação, com o código de rastreio opcional. Quem comprou recebe o e-mail de pedido enviado, com o rastreio. Na retirada na loja, enviado é o pedido pronto para retirar.\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderShip"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/deliver":{"post":{"operationId":"deliverOrder","summary":"Marca o pedido como entregue","description":"Só o pedido enviado. Na retirada na loja, entregue é o pedido retirado.\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/cancel":{"post":{"operationId":"cancelOrder","summary":"Cancela o pedido","description":"Os itens voltam ao estoque, e a cobrança em aberto deixa de valer. O pedido já pago tem o dinheiro devolvido a quem comprou, pelo gateway que cobrou: cancelá-lo pede também o escopo refund_orders (sem ele, 403). Se o gateway recusar o estorno, nada muda. O pedido enviado ou entregue não se cancela (409).\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/invoice":{"put":{"operationId":"setOrderInvoice","summary":"Informa a nota fiscal do pedido","description":"A nota emitida pelo ERP (a plataforma não emite nota): a chave de acesso, e o número, a série e o link, opcionais. O número e a série estão dentro da chave; sem eles, saem dela. Informar de novo troca a nota anterior. A nota aparece no pedido no painel, e a compra da etiqueta do Melhor Envio usa a chave.\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoice"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/line_items/{line_id}/prescription":{"put":{"operationId":"setLineItemPrescription","summary":"Informa a receita de um item","description":"A receita oftalmológica recebida por outro canal (o balcão, o ERP da ótica, o telefone), com os nomes em inglês e os rótulos do padrão dos laboratórios (DCS) nas descrições. Conferida pelas mesmas regras do checkout (faixas, passos de 0.25, eixo com o cilíndrico, adição na progressive e na bifocal): o erro diz o campo. Troca a receita que havia; a conferida volta a provided. Só o item que pede receita (prescription não é null); sem isso, 409. A receita que estava pendente gera o evento order.prescription_received. A resposta é o pedido com os valores da receita, como no GET.\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"name":"line_id","in":"path","required":true,"description":"O id do item do pedido (line_items[].id) que pede a receita.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prescription"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/orders/{id}/line_items/{line_id}/prescription/check":{"post":{"operationId":"checkLineItemPrescription","summary":"Marca a receita de um item como conferida","description":"A ótica conferiu a receita (a foto contra os valores, a validade, o médico). Só a receita informada (status provided); a pendente dá 409. Gera order.updated. A resposta é o pedido com os valores da receita, como no GET.\n\nEscopo: `write_orders`.","x-denaryx-scopes":["write_orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do pedido.","schema":{"type":"string","format":"uuid"}},{"name":"line_id","in":"path","required":true,"description":"O id do item do pedido (line_items[].id) que pede a receita.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/customers":{"get":{"operationId":"listCustomers","summary":"Os clientes da loja","description":"As contas que os compradores abriram na loja (a área do cliente, com o código mandado ao e-mail), com os endereços salvos. Quem compra sem conta não aparece aqui: os dados dele estão nos pedidos. Na ordem da última mudança, da mais antiga à mais nova, com o id para desempatar: para sincronizar, guarde o updated_at do último que leu e peça updated_at_min na próxima vez. Entrar na conta não conta como mudança. Cada cliente traz o e-mail, o telefone, o CPF e os endereços.\n\nEscopo: `read_customers`.","x-denaryx-scopes":["read_customers"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Quantos itens por página, de 1 a 100 (50 sem ele).","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"O next_cursor da página anterior, como veio. Os filtros continuam os mesmos.","schema":{"type":"string","maxLength":200}},{"name":"ids","in":"query","required":false,"description":"Só estes ids, separados por vírgula (até 100).","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Só a conta deste e-mail (exato, sem diferença de maiúsculas): o jeito de achar a conta de quem comprou.","schema":{"type":"string","maxLength":254}},{"name":"updated_at_min","in":"query","required":false,"description":"Só o que mudou a partir desta data (ISO 8601): a sincronização incremental.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_min","in":"query","required":false,"description":"Só o criado a partir desta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_at_max","in":"query","required":false,"description":"Só o criado até esta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/customers/{id}":{"get":{"operationId":"getCustomer","summary":"Um cliente","description":"A conta, com os endereços salvos. O id é o customer.id dos pedidos feitos com ela. A conta excluída (pelo próprio comprador ou pela loja, em Privacidade) dá 404.\n\nEscopo: `read_customers`.","x-denaryx-scopes":["read_customers"],"parameters":[{"name":"id","in":"path","required":true,"description":"O id da conta do cliente.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/reports/sales":{"get":{"operationId":"getSalesReport","summary":"As vendas do período","description":"As vendas somadas no período, e por dia, produto ou coleção, sem nenhum dado de quem comprou. Venda é o pedido pago e não cancelado, pela data do pagamento em Brasília (America/Sao_Paulo), como nos relatórios do painel. revenue é o valor dos produtos com os descontos e sem o frete, o mesmo da compra que a loja manda à Meta, ao TikTok e ao GA4; por produto e por coleção, é o dos itens, antes do cupom e do desconto no Pix. A coleção soma os produtos dela e das coleções de baixo. Por dia, o período vai até 92 dias; por produto ou coleção, até 366.\n\nEscopo: `read_reports`.","x-denaryx-scopes":["read_reports"],"parameters":[{"name":"from","in":"query","required":false,"description":"O primeiro dia (AAAA-MM-DD), em Brasília. Junto com to; sem os dois, os últimos 30 dias, até hoje.","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"description":"O último dia (AAAA-MM-DD), inclusive.","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"group_by","in":"query","required":false,"description":"day: uma linha por dia, com os dias sem venda; product ou collection: as que mais venderam em receita.","schema":{"default":"day","type":"string","enum":["day","product","collection"]}},{"name":"limit","in":"query","required":false,"description":"Por produto ou coleção, quantas linhas, de 1 a 100 (50 sem ele). truncated diz se há mais.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesReport"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/reports/searches":{"get":{"operationId":"getSearchReport","summary":"As buscas da vitrine no período","description":"Os termos que os compradores buscaram na vitrine, somados no período: os que mais voltaram sem nenhum produto (no_results), os mais buscados (top) e os que acharam produtos sem clique (no_clicks). Serve para criar páginas, categorias ou sinônimos para o que ninguém acha. Só termos e contagens: nada de quem buscou, e o termo que parecia dado pessoal (e-mail, CPF, telefone, cartão) não é guardado. Conta uma busca por página de resultados (a primeira, sem filtro e na ordem padrão); as sugestões enquanto o comprador digita, os robôs e a prévia do tema não contam. Os dias são os de Brasília (America/Sao_Paulo); o período vai até 366 dias, e as buscas ficam 13 meses.\n\nEscopo: `read_products` ou `read_content`.","x-denaryx-scopes":["read_products","read_content"],"parameters":[{"name":"from","in":"query","required":false,"description":"O primeiro dia (AAAA-MM-DD), em Brasília. Junto com to; sem os dois, os últimos 30 dias, até hoje.","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"description":"O último dia (AAAA-MM-DD), inclusive.","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"limit","in":"query","required":false,"description":"Quantos termos em cada lista, de 1 a 100 (50 sem ele).","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchReport"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/events":{"get":{"operationId":"listEvents","summary":"Os eventos da loja dos últimos 30 dias","description":"O que mudou nos pedidos, no catálogo, nos temas e nas contas dos clientes, do mais antigo ao mais novo, só dos tipos que os escopos do token alcançam (os pedidos pedem read_orders; os produtos e o estoque, read_products; os temas, read_themes; os clientes, read_customers). Cada evento traz só o resumo (o id do recurso e o que cabe sem dado pessoal): para o recurso inteiro, consulte a rota dele. Serve para recuperar o que um webhook perdeu.\n\nEscopo: `read_products` ou `read_orders` ou `read_themes` ou `read_customers`.","x-denaryx-scopes":["read_products","read_orders","read_themes","read_customers"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Quantos itens por página, de 1 a 100 (50 sem ele).","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"O next_cursor da página anterior, como veio. Os filtros continuam os mesmos.","schema":{"type":"string","maxLength":200}},{"name":"types","in":"query","required":false,"description":"Só estes tipos, separados por vírgula: order.created, order.paid, order.updated, order.shipped, order.delivered, order.cancelled, order.anonymized, order.prescription_received, product.created, product.updated, product.deleted, inventory.updated, theme.published, customer.created, customer.updated, customer.deleted.","schema":{"type":"string"}},{"name":"created_at_min","in":"query","required":false,"description":"Só o criado a partir desta data (ISO 8601).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"resource_id","in":"query","required":false,"description":"Só os eventos deste recurso (o id do pedido, do produto, da variante, do tema ou do cliente).","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"Os webhooks da integração","description":"Os webhooks da integração do token (no máximo 10). Cabem numa página só.\n\nQualquer token da loja.","x-denaryx-scopes":[],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"createWebhook","summary":"Cadastra um webhook","description":"O endereço https que recebe os eventos escolhidos, cada um num POST assinado com Denaryx-Signature. Cada evento pede o escopo de leitura do recurso dele (sem ele, 403). A resposta traz o segredo da assinatura, que não aparece de novo.\n\nQualquer token da loja.","x-denaryx-scopes":[],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/webhooks/{id}":{"get":{"operationId":"getWebhook","summary":"Um webhook","description":"Sem o segredo, que só aparece na criação e na troca.\n\nQualquer token da loja.","x-denaryx-scopes":[],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do webhook.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"patch":{"operationId":"updateWebhook","summary":"Muda um webhook","description":"O endereço, os eventos ou a situação (paused pausa; active reativa, também o desligado por falhas). Com rotate_secret=true, gera um segredo novo, que vem na resposta; o anterior continua assinando junto por 24 horas, para dar tempo de trocar.\n\nQualquer token da loja.","x-denaryx-scopes":[],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do webhook.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"deleteWebhook","summary":"Exclui um webhook","description":"As entregas pendentes não saem mais, e o registro delas vai junto.\n\nQualquer token da loja.","x-denaryx-scopes":[],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do webhook.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"Sucesso, sem corpo.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/webhooks/{id}/test":{"post":{"operationId":"testWebhook","summary":"Envia um evento de teste","description":"Um POST assinado com o evento webhook.test, na hora, numa tentativa só: a resposta diz se o endereço respondeu 2xx em até 10 segundos. Vale também para o webhook pausado ou desligado, para conferir o endereço antes de reativar.\n\nQualquer token da loja.","x-denaryx-scopes":[],"parameters":[{"name":"id","in":"path","required":true,"description":"O id do webhook.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Sucesso.","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Denaryx-Api-Version":{"$ref":"#/components/headers/Denaryx-Api-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTest"}}}},"401":{"$ref":"#/components/responses/AuthenticationError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}},"webhooks":{"order.created":{"post":{"operationId":"webhook_order_created","summary":"order.created","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"order.paid":{"post":{"operationId":"webhook_order_paid","summary":"order.paid","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"order.updated":{"post":{"operationId":"webhook_order_updated","summary":"order.updated","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"order.shipped":{"post":{"operationId":"webhook_order_shipped","summary":"order.shipped","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"order.delivered":{"post":{"operationId":"webhook_order_delivered","summary":"order.delivered","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"order.cancelled":{"post":{"operationId":"webhook_order_cancelled","summary":"order.cancelled","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"order.anonymized":{"post":{"operationId":"webhook_order_anonymized","summary":"order.anonymized","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"order.prescription_received":{"post":{"operationId":"webhook_order_prescription_received","summary":"order.prescription_received","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"product.created":{"post":{"operationId":"webhook_product_created","summary":"product.created","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"product.updated":{"post":{"operationId":"webhook_product_updated","summary":"product.updated","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"product.deleted":{"post":{"operationId":"webhook_product_deleted","summary":"product.deleted","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"customer.deleted":{"post":{"operationId":"webhook_customer_deleted","summary":"customer.deleted","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"inventory.updated":{"post":{"operationId":"webhook_inventory_updated","summary":"inventory.updated","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"theme.published":{"post":{"operationId":"webhook_theme_published","summary":"theme.published","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"customer.created":{"post":{"operationId":"webhook_customer_created","summary":"customer.created","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"customer.updated":{"post":{"operationId":"webhook_customer_updated","summary":"customer.updated","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}},"webhook.test":{"post":{"operationId":"webhook_webhook_test","summary":"webhook.test","description":"Responda 2xx em até 10 segundos; qualquer outra resposta (também 3xx) conta como falha e é tentada de novo, até 10 vezes em cerca de 36 horas. Confira a assinatura antes de usar o corpo (ver https://denaryx.com/desenvolvedores/webhooks).","parameters":[{"name":"Denaryx-Signature","in":"header","required":true,"description":"t=<segundos desde 1970>,v1=<HMAC-SHA256 em hexadecimal de \"t.corpo\", com o segredo>. Na troca do segredo, por 24 horas vêm dois v1.","schema":{"type":"string"}},{"name":"Denaryx-Event-Id","in":"header","required":true,"description":"O id do evento: o mesmo em todas as tentativas.","schema":{"type":"string"}},{"name":"Denaryx-Event-Type","in":"header","required":true,"description":"O tipo do evento.","schema":{"type":"string"}},{"name":"Denaryx-Delivery-Id","in":"header","required":true,"description":"O id da entrega (a do teste é outra a cada envio).","schema":{"type":"string"}},{"name":"Denaryx-Api-Version","in":"header","required":true,"description":"A versão da API em que o corpo foi montado.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEvent"}}}},"responses":{"2XX":{"description":"Recebido."}}}}},"components":{"securitySchemes":{"token":{"type":"http","scheme":"bearer","description":"O token da integração (dnxa_...), criado em Configurações › Integrações no painel da loja. É segredo de servidor: nunca vai para o navegador. O CLI de temas também entra pela conta da pessoa (denaryx login), com um token de sessão (dnxp_...) que vale só nas rotas de temas, em /token e em /shop, com os escopos do papel da pessoa na loja."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Até 255 caracteres. A mesma escrita mandada de novo com a mesma chave, em até 24 horas, devolve a resposta guardada (com Idempotent-Replayed: true) em vez de acontecer duas vezes.","schema":{"type":"string","minLength":1,"maxLength":255}}},"schemas":{"Assembly":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"type":"string"},"active":{"type":"boolean"},"optional":{"type":"boolean"},"groups":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"required":{"type":"boolean"},"multiple":{"type":"boolean"},"product_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["code","name","required","multiple","product_ids"]}},"collection_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"product_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"incomplete":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","description","active","optional","groups","collection_ids","product_ids","incomplete","created_at","updated_at"]},"AssemblyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"default":"","type":"string","maxLength":500},"active":{"default":true,"type":"boolean"},"optional":{"default":false,"type":"boolean"},"groups":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"code":{"type":"string"},"required":{"default":false,"type":"boolean"},"multiple":{"default":false,"type":"boolean"},"product_ids":{"maxItems":30,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["name","product_ids"]}},"collection_ids":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"product_ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["name","groups"]},"AssemblyList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Assembly"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"AssemblyUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"active":{"type":"boolean"},"optional":{"type":"boolean"},"groups":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"code":{"type":"string"},"required":{"default":false,"type":"boolean"},"multiple":{"default":false,"type":"boolean"},"product_ids":{"maxItems":30,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["name","product_ids"]}},"collection_ids":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"product_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}},"BatchResult":{"type":"object","properties":{"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}}},"required":["variants"]},"Brand":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"logo_url":{"type":["string","null"]},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"products_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","handle","description","logo_url","seo","products_count"]},"BrandCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"handle":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","maxLength":2000},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}}},"required":["name"]},"BrandList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"BrandUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"handle":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","maxLength":2000},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}}}},"CollectionCreate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":60},"handle":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"parent_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"attributes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":{"default":false,"type":"boolean"}},"required":["attribute_id"]}},"google_category_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"description":{"type":"string","maxLength":5000},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}},"template_suffix":{"type":"string","maxLength":40}},"required":["title"]},"CollectionList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"handle":{"type":"string"},"path":{"type":"string"},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"products_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attributes":{"type":"array","items":{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":{"type":"boolean"}},"required":["attribute_id","required"]}},"google_category_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","parent_id","title","handle","path","level","products_count","attributes","google_category_id"]}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"CollectionUpdate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":60},"handle":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"attributes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":{"default":false,"type":"boolean"}},"required":["attribute_id"]}},"google_category_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"description":{"type":"string","maxLength":5000},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}},"template_suffix":{"type":"string","maxLength":40}}},"CollectionWithContent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"handle":{"type":"string"},"path":{"type":"string"},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"products_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attributes":{"type":"array","items":{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":{"type":"boolean"}},"required":["attribute_id","required"]}},"google_category_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"description":{"type":"string"},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"template_suffix":{"type":"string"}},"required":["id","parent_id","title","handle","path","level","products_count","attributes","google_category_id","description","seo","template_suffix"]},"Count":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count"]},"Customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]},"cpf":{"type":["string","null"]},"accepts_marketing":{"type":"boolean"},"accepts_marketing_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"zip":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"complement":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"default":{"type":"boolean"}},"required":["id","name","zip","street","number","complement","neighborhood","city","state","default"]}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","email","name","phone","cpf","accepts_marketing","accepts_marketing_at","addresses","created_at","updated_at"]},"CustomerEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["customer.created","customer.updated"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"description":"A conta do cliente como está na hora do envio, com os endereços.","$ref":"#/components/schemas/Customer"}},"required":["id","type","created_at","api_version","data"]},"CustomerList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"DeletedEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["product.deleted","customer.deleted"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"]}},"required":["id","type","created_at","api_version","data"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","not_found","conflict","invalid_request","rate_limited","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}},"request_id":{"type":"string"},"conflicts":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"current_checksum":{"type":["string","null"]}},"required":["path","current_checksum"]}},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":["string","null"]},"file":{"type":["string","null"]},"line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end_line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end_column":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}},"required":["code","file","line","column","end_line","end_column","message","severity"]}},"content_conflicts":{"type":"array","items":{"type":"object","properties":{"change_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string"},"expected":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"}]},{"type":"null"}]},"current":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"}]},{"type":"null"}]}},"required":["change_id","field","expected","current"]}}},"required":["type","code","message","request_id"]}},"required":["error"]},"EventList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["order.created","order.paid","order.updated","order.shipped","order.delivered","order.cancelled","order.anonymized","order.prescription_received","product.created","product.updated","product.deleted","inventory.updated","theme.published","customer.created","customer.updated","customer.deleted"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"api_version":{"type":"string","enum":["2026-10"]},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do recurso: o pedido, o produto, a variante, o tema ou o cliente."},"number":{"description":"Nos eventos de pedido: o número do pedido na loja.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"description":"Nos eventos de pedido (menos order.anonymized): a situação depois da mudança.","type":"string","enum":["pending_payment","paid","preparing","shipped","delivered","cancelled"]},"line_item_id":{"description":"Em order.prescription_received: o item do pedido cuja receita chegou. A receita mesmo só sai no GET do pedido.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"product_id":{"description":"Em inventory.updated: o produto da variante.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inventory_quantity":{"description":"Em inventory.updated: o estoque depois da mudança.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id"]}},"required":["id","type","created_at","api_version","data"]}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"InventoryAdjust":{"type":"object","properties":{"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sku":{"type":"string","minLength":1,"maxLength":64},"delta":{"type":"integer","minimum":-1000000,"maximum":1000000}},"required":["delta"]}}},"required":["items"]},"InventoryEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["inventory.updated"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"description":"A variante como está na hora do envio, com o inventory_quantity.","$ref":"#/components/schemas/Variant"}},"required":["id","type","created_at","api_version","data"]},"InventorySet":{"type":"object","properties":{"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sku":{"type":"string","minLength":1,"maxLength":64},"inventory_quantity":{"type":"integer","minimum":0,"maximum":1000000}},"required":["inventory_quantity"]}}},"required":["items"]},"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending_payment","paid","preparing","shipped","delivered","cancelled"]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"cpf":{"type":"string"}},"required":["id","name","email","phone","cpf"]},"shipping_address":{"type":"object","properties":{"zip":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"complement":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"}},"required":["zip","street","number","complement","neighborhood","city","state"]},"line_items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":["string","null"]},"parent_line_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"group":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"inventory_tracked":{"type":"boolean"},"eyes":{"anyOf":[{"type":"object","properties":{"right":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"left":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["right","left"]},{"type":"null"}]},"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"sku":{"type":["string","null"]},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promotion":{"type":["string","null"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["general","prescription"]},"url":{"type":"string","format":"uri"},"url_expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","content_type","size","purpose","url","url_expires_at"]}},"prescription":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["single_vision","progressive","bifocal","reading","plano","contact_lens"]},{"type":"null"}]},"right":{"anyOf":[{"type":"object","properties":{"sphere":{"type":"number"},"cylinder":{"type":"number"},"axis":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"add":{"type":["number","null"]},"base_curve":{"type":["number","null"]},"diameter":{"type":["number","null"]}},"required":["sphere","cylinder","axis","add"]},{"type":"null"}]},"left":{"anyOf":[{"type":"object","properties":{"sphere":{"type":"number"},"cylinder":{"type":"number"},"axis":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"add":{"type":["number","null"]},"base_curve":{"type":["number","null"]},"diameter":{"type":["number","null"]}},"required":["sphere","cylinder","axis","add"]},{"type":"null"}]},"pd":{"anyOf":[{"anyOf":[{"type":"object","properties":{"binocular":{"type":"number"}},"required":["binocular"]},{"type":"object","properties":{"right":{"type":"number"},"left":{"type":"number"}},"required":["right","left"]}]},{"type":"null"}]},"segment_height":{"anyOf":[{"type":"object","properties":{"right":{"type":"number"},"left":{"type":"number"}},"required":["right","left"]},{"type":"null"}]},"prism":{"anyOf":[{"type":"object","properties":{"right":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"base":{"type":"string","enum":["in","out","up","down"]}},"required":["value","base"]},{"type":"null"}]},"left":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"base":{"type":"string","enum":["in","out","up","down"]}},"required":["value","base"]},{"type":"null"}]}},"required":["right","left"]},{"type":"null"}]},"issued_at":{"type":["string","null"]},"doctor":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"license":{"type":["string","null"]}},"required":["name","license"]},{"type":"null"}]},"note":{"type":["string","null"]},"lens_brand":{"type":["string","null"]},"status":{"type":"string","enum":["pending","declared","provided","checked"]},"provided_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"checked_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"declared_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"declaration":{"type":["string","null"]},"store_note":{"type":["string","null"]}},"required":["status","provided_at","checked_at"]},{"type":"null"}]}},"required":["id","key","parent_line_id","group","properties","inventory_tracked","eyes","variant_id","title","options","sku","price","quantity","line_price","promotion","prescription"]}},"subtotal_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shipping_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_discounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"coupon_code":{"type":["string","null"]},"pix_discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shipping_line":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"carrier":{"type":"string"},"delivery_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pickup":{"anyOf":[{"type":"object","properties":{"address":{"type":"string"},"instructions":{"type":"string"}},"required":["address","instructions"]},{"type":"null"}]}},"required":["title","carrier","delivery_days","pickup"]},{"type":"null"}]},"tracking_code":{"type":["string","null"]},"payment":{"anyOf":[{"type":"object","properties":{"method":{"type":"string","enum":["pix","credit_card","debit_card","boleto"]},"status":{"type":"string","enum":["pending","approved","expired","cancelled","declined","refunded","authorized"]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installments":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["method","status","amount","installments","refunded_at","created_at"]},{"type":"null"}]},"invoice":{"anyOf":[{"type":"object","properties":{"key":{"type":"string"},"number":{"type":"string"},"series":{"type":"string"},"url":{"type":["string","null"]},"informed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["key","number","series","url","informed_at"]},{"type":"null"}]},"paid_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"test":{"type":"boolean"},"anonymized_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","number","status","customer","shipping_address","line_items","subtotal_price","shipping_price","total_discounts","coupon_code","pix_discount","total_price","shipping_line","tracking_code","payment","invoice","paid_at","test","anonymized_at","created_at","updated_at"]},"OrderEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["order.created","order.paid","order.updated","order.shipped","order.delivered","order.cancelled","order.anonymized"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"description":"O pedido como está na hora do envio (pode já ter mudado de novo).","$ref":"#/components/schemas/Order"}},"required":["id","type","created_at","api_version","data"]},"OrderInvoice":{"type":"object","properties":{"key":{"type":"string"},"number":{"type":"string","pattern":"^\\d{1,9}$"},"series":{"type":"string","pattern":"^\\d{1,3}$"},"url":{"type":"string","maxLength":500,"format":"uri"}},"required":["key"]},"OrderList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"OrderShip":{"type":"object","properties":{"tracking_code":{"type":"string"}}},"Page":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"handle":{"type":"string"},"body":{"type":"string"},"published":{"type":"boolean"},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"template_suffix":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","handle","body","published","seo","template_suffix","updated_at"]},"PageCreate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"handle":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"body":{"default":"","type":"string","maxLength":20000},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}},"template_suffix":{"type":"string","maxLength":40}},"required":["title"]},"PageList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"handle":{"type":"string"},"published":{"type":"boolean"},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"template_suffix":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","handle","published","seo","template_suffix","updated_at"]}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"PageUpdate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"handle":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"body":{"type":"string","maxLength":20000},"published":{"type":"boolean"},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}},"template_suffix":{"type":"string","maxLength":40}}},"Prescription":{"type":"object","properties":{"type":{"type":"string","enum":["single_vision","progressive","bifocal","reading","plano","contact_lens"],"description":"single_vision (visão simples), progressive (multifocal), bifocal, reading (leitura), plano (sem grau) ou contact_lens (lente de contato)."},"right":{"description":"O olho direito (OD). Obrigatório, menos no plano; na contact_lens, basta um dos olhos.","type":"object","properties":{"sphere":{"description":"Esférico (SPH), de -20.00 a +20.00, de 0.25 em 0.25.","type":["number","string"]},"cylinder":{"description":"Cilíndrico (CYL), de -8.00 a +8.00, de 0.25 em 0.25, como o médico escreveu. Ausente vale 0.","type":["number","string","null"]},"axis":{"description":"Eixo (AX), de 0 a 180, inteiro: obrigatório com cilíndrico, ignorado sem ele.","type":["number","string","null"]},"add":{"description":"Adição (ADD), de 0.75 a 4.00: obrigatória na progressive e na bifocal, opcional na contact_lens, recusada nas outras.","type":["number","string","null"]},"base_curve":{"description":"Curva base (BC) em mm, de 7.0 a 10.0, com uma casa decimal: só na contact_lens.","type":["number","string","null"]},"diameter":{"description":"Diâmetro (DIA) em mm, de 8.0 a 16.0, com uma casa decimal: só na contact_lens.","type":["number","string","null"]}},"required":["sphere"]},"left":{"description":"O olho esquerdo (OE). Obrigatório, menos no plano; na contact_lens, basta um dos olhos.","type":"object","properties":{"sphere":{"description":"Esférico (SPH), de -20.00 a +20.00, de 0.25 em 0.25.","type":["number","string"]},"cylinder":{"description":"Cilíndrico (CYL), de -8.00 a +8.00, de 0.25 em 0.25, como o médico escreveu. Ausente vale 0.","type":["number","string","null"]},"axis":{"description":"Eixo (AX), de 0 a 180, inteiro: obrigatório com cilíndrico, ignorado sem ele.","type":["number","string","null"]},"add":{"description":"Adição (ADD), de 0.75 a 4.00: obrigatória na progressive e na bifocal, opcional na contact_lens, recusada nas outras.","type":["number","string","null"]},"base_curve":{"description":"Curva base (BC) em mm, de 7.0 a 10.0, com uma casa decimal: só na contact_lens.","type":["number","string","null"]},"diameter":{"description":"Diâmetro (DIA) em mm, de 8.0 a 16.0, com uma casa decimal: só na contact_lens.","type":["number","string","null"]}},"required":["sphere"]},"pd":{"description":"Distância pupilar em mm (IPD), de 0.5 em 0.5: um número ou { binocular } (de 40 a 80), ou { right, left } (NPD, de 20 a 40 cada).","anyOf":[{"anyOf":[{"type":["number","string"]},{"type":"object","properties":{"binocular":{"type":["number","string"]}},"required":["binocular"]},{"type":"object","properties":{"right":{"type":["number","string"]},"left":{"type":["number","string"]}},"required":["right","left"]}]},{"type":"null"}]},"segment_height":{"description":"Altura de montagem em mm (SEGHT), de 10 a 40, de 0.5 em 0.5: só na progressive e na bifocal.","anyOf":[{"type":"object","properties":{"right":{"type":["number","string"]},"left":{"type":["number","string"]}},"required":["right","left"]},{"type":"null"}]},"prism":{"anyOf":[{"type":"object","properties":{"right":{"anyOf":[{"type":"object","properties":{"value":{"description":"Prisma (PRVM), de 0.25 a 10.00, de 0.25 em 0.25.","type":["number","string"]},"base":{"type":"string","enum":["in","out","up","down"],"description":"A base do prisma (PRVA): in (nasal), out (temporal), up ou down."}},"required":["value","base"]},{"type":"null"}]},"left":{"anyOf":[{"type":"object","properties":{"value":{"description":"Prisma (PRVM), de 0.25 a 10.00, de 0.25 em 0.25.","type":["number","string"]},"base":{"type":"string","enum":["in","out","up","down"],"description":"A base do prisma (PRVA): in (nasal), out (temporal), up ou down."}},"required":["value","base"]},{"type":"null"}]}}},{"type":"null"}]},"issued_at":{"description":"A data da receita, AAAA-MM-DD. Não pode ser depois de hoje.","type":["string","null"]},"doctor":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"license":{"description":"O CRM.","type":["string","null"]}},"required":["name"]},{"type":"null"}]},"note":{"description":"A observação da receita, até 300 caracteres.","type":["string","null"]},"lens_brand":{"description":"A lente receitada (marca e modelo), até 80 caracteres: só na contact_lens.","type":["string","null"]}},"required":["type"]},"PrescriptionEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["order.prescription_received"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do pedido."},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"O número do pedido."},"line_item_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O item cuja receita chegou."}},"required":["id","number","line_item_id"]}},"required":["id","type","created_at","api_version","data"]},"PriceSet":{"type":"object","properties":{"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sku":{"type":"string","minLength":1,"maxLength":64},"price":{"type":"integer","minimum":0,"maximum":100000000},"compare_at_price":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]},"cost":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]}}}}},"required":["items"]},"Product":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"active":{"type":"boolean"},"template_suffix":{"type":"string"},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"attribute_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name","attribute_id"]}},"brand_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"mpn":{"type":"string"},"condition":{"type":"string","enum":["new","used","refurbished"]},"tax":{"type":"object","properties":{"ncm":{"type":"string"},"cest":{"type":"string"},"origin":{"anyOf":[{"type":"string","enum":["0","1","2","3","4","5","6","7","8"]},{"type":"null"}]},"unit":{"type":"string"}},"required":["ncm","cest","origin","unit"]},"dimensions":{"anyOf":[{"type":"object","properties":{"weight_grams":{"type":"integer","exclusiveMinimum":0,"maximum":30000},"height_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200},"width_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200},"length_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200}},"required":["weight_grams","height_cm","width_cm","length_cm"]},{"type":"null"}]},"inventory_tracked":{"type":"boolean"},"sold_separately":{"type":"boolean"},"requires_prescription":{"type":"boolean"},"prescription_type":{"type":"string","enum":["glasses","contact_lens"]},"contact_lens_mode":{"type":"string","enum":["by_prescription","by_power"]},"collection_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"specifications":{"type":"array","items":{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"required":["attribute_id","value"]}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}},"images":{"type":"array","items":{"$ref":"#/components/schemas/ProductImage"}},"try_on":{"type":"object","properties":{"available":{"type":"boolean"},"type":{"anyOf":[{"type":"string","enum":["2d","3d"]},{"type":"null"}]}},"required":["available","type"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","title","handle","description","active","template_suffix","seo","options","brand_id","mpn","condition","tax","dimensions","inventory_tracked","sold_separately","requires_prescription","prescription_type","contact_lens_mode","collection_ids","specifications","variants","images","try_on","created_at","updated_at"]},"ProductCreate":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":120},"handle":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"default":"","type":"string","maxLength":5000},"active":{"default":true,"type":"boolean"},"template_suffix":{"default":"","type":"string","maxLength":40},"seo":{"default":{},"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}},"options":{"default":[],"maxItems":3,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":30},"attribute_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name"]}},"brand_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"mpn":{"default":"","type":"string","maxLength":60},"condition":{"default":"new","type":"string","enum":["new","used","refurbished"]},"tax":{"default":{},"type":"object","properties":{"ncm":{"type":"string"},"cest":{"type":"string"},"origin":{"anyOf":[{"type":"string","enum":["0","1","2","3","4","5","6","7","8"]},{"type":"null"}]},"unit":{"type":"string"}}},"dimensions":{"default":null,"anyOf":[{"type":"object","properties":{"weight_grams":{"type":"integer","exclusiveMinimum":0,"maximum":30000},"height_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200},"width_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200},"length_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200}},"required":["weight_grams","height_cm","width_cm","length_cm"]},{"type":"null"}]},"inventory_tracked":{"default":true,"type":"boolean"},"sold_separately":{"default":true,"type":"boolean"},"requires_prescription":{"default":false,"type":"boolean"},"prescription_type":{"default":"glasses","type":"string","enum":["glasses","contact_lens"],"description":"A receita que a lente pede: glasses (óculos) ou contact_lens (lente de contato). Só vale com requires_prescription."},"contact_lens_mode":{"default":"by_prescription","type":"string","enum":["by_prescription","by_power"],"description":"Como a lente de contato é vendida: by_prescription (o grau vem da receita, a variante tem a faixa) ou by_power (uma opção só, o grau, como -2,00; cada variante é a caixa de um grau, com sku, barcode e estoque, e a prescription_range sai do grau). Só vale com prescription_type contact_lens."},"collection_ids":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"specifications":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"required":["attribute_id","value"]}},"variants":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/VariantCreate"}}},"required":["title","variants"]},"ProductEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["product.created","product.updated"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"description":"O produto como está na hora do envio.","$ref":"#/components/schemas/Product"}},"required":["id","type","created_at","api_version","data"]},"ProductImage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"src":{"type":"string"},"thumbnail_src":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"alt":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"variant_option":{"anyOf":[{"type":"object","properties":{"option_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"value":{"type":"string"}},"required":["option_index","value"]},{"type":"null"}]}},"required":["id","src","thumbnail_src","width","height","alt","position","variant_option"]},"ProductImageFromUrl":{"type":"object","properties":{"src":{"type":"string","maxLength":2000},"alt":{"default":"","type":"string","maxLength":125}},"required":["src"]},"ProductImageUpdate":{"type":"object","properties":{"alt":{"type":"string","maxLength":125}},"required":["alt"]},"ProductList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ProductTryOn":{"type":"object","properties":{"product_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"try_on":{"anyOf":[{"$ref":"#/components/schemas/TryOn"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"try_on":{"$ref":"#/components/schemas/TryOn"}},"required":["variant_id","try_on"]}}},"required":["product_id","try_on","variants"]},"ProductUpdate":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":120},"handle":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","maxLength":5000},"active":{"type":"boolean"},"template_suffix":{"type":"string","maxLength":40},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"description":{"type":"string","maxLength":320}}},"options":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":30},"attribute_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name"]}},"brand_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"mpn":{"type":"string","maxLength":60},"condition":{"type":"string","enum":["new","used","refurbished"]},"tax":{"type":"object","properties":{"ncm":{"type":"string"},"cest":{"type":"string"},"origin":{"anyOf":[{"type":"string","enum":["0","1","2","3","4","5","6","7","8"]},{"type":"null"}]},"unit":{"type":"string"}}},"dimensions":{"anyOf":[{"type":"object","properties":{"weight_grams":{"type":"integer","exclusiveMinimum":0,"maximum":30000},"height_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200},"width_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200},"length_cm":{"type":"integer","exclusiveMinimum":0,"maximum":200}},"required":["weight_grams","height_cm","width_cm","length_cm"]},{"type":"null"}]},"inventory_tracked":{"type":"boolean"},"sold_separately":{"type":"boolean"},"requires_prescription":{"type":"boolean"},"prescription_type":{"type":"string","enum":["glasses","contact_lens"],"description":"A receita que a lente pede: glasses (óculos) ou contact_lens (lente de contato). Só vale com requires_prescription."},"contact_lens_mode":{"type":"string","enum":["by_prescription","by_power"],"description":"Como a lente de contato é vendida: by_prescription (o grau vem da receita, a variante tem a faixa) ou by_power (uma opção só, o grau, como -2,00; cada variante é a caixa de um grau, com sku, barcode e estoque, e a prescription_range sai do grau). Só vale com prescription_type contact_lens."},"collection_ids":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"specifications":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"required":["attribute_id","value"]}}}},"Proposal":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resource_type":{"type":"string","enum":["product","collection","brand","page","image"]},"resource_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"product_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"label":{"type":"string"},"action":{"type":"string","enum":["update","create","revert"]},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"before":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"}]},{"type":"null"}]},"after":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"}]}},"required":["field","before","after"]}},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"origin":{"type":"string","enum":["mcp","api"]},"status":{"type":"string","enum":["pending","approved","rejected","conflict","expired"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"decided_at":{"type":["string","null"]},"rejection_reason":{"type":["string","null"]},"conflict":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"expected":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"}]},{"type":"null"}]},"current":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"}]},{"type":"null"}]}},"required":["field","expected","current"]}}},"required":["code","message","fields"]},{"type":"null"}]},"change_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reverts":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","resource_type","resource_id","product_id","label","action","fields","batch_id","origin","status","created_at","expires_at","decided_at","rejection_reason","conflict","change_id","reverts"]},"ProposalList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Proposal"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"SalesReport":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"group_by":{"type":"string","enum":["day","product","collection"]},"timezone":{"type":"string","const":"America/Sao_Paulo"},"currency":{"type":"string","const":"BRL"},"totals":{"type":"object","properties":{"orders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os pedidos pagos."},"items":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As unidades vendidas."},"revenue":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A receita, em centavos: o valor dos produtos com os descontos e sem o frete, o mesmo valor da compra mandado à Meta, ao TikTok e ao GA4."},"average_order_value":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"O ticket médio, em centavos: revenue dividido por orders, arredondado. Null sem pedidos: não há ticket médio, e o 0 entraria numa média como se fosse um valor."},"discount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os descontos do pedido, em centavos: o do cupom e o do Pix somados."},"shipping":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"O frete cobrado, em centavos."}},"required":["orders","items","revenue","average_order_value","discount","shipping"]},"rows":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"orders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os pedidos pagos."},"items":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As unidades vendidas."},"revenue":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A receita, em centavos: o valor dos produtos com os descontos e sem o frete, o mesmo valor da compra mandado à Meta, ao TikTok e ao GA4."},"average_order_value":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"O ticket médio, em centavos: revenue dividido por orders, arredondado. Null sem pedidos: não há ticket médio, e o 0 entraria numa média como se fosse um valor."},"discount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os descontos do pedido, em centavos: o do cupom e o do Pix somados."},"shipping":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"O frete cobrado, em centavos."},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"O dia do pagamento, em Brasília."}},"required":["orders","items","revenue","average_order_value","discount","shipping","date"]},{"type":"object","properties":{"product_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Null quando o produto saiu do catálogo."},"title":{"type":"string","description":"O nome de agora, ou o guardado no pedido, se o produto saiu do catálogo."},"orders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os pedidos pagos com este item."},"items":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As unidades vendidas."},"revenue":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A receita dos itens, em centavos: preço vezes unidades, antes do cupom e do desconto no Pix."},"average_order_value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A receita dos itens por pedido, em centavos, arredondada."}},"required":["product_id","title","orders","items","revenue","average_order_value"]},{"type":"object","properties":{"collection_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Null: os itens de produtos sem coleção ou que saíram do catálogo."},"title":{"type":["string","null"]},"path":{"description":"O caminho na vitrine, com os handles desde o topo.","type":["string","null"]},"orders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os pedidos pagos com este item."},"items":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As unidades vendidas."},"revenue":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A receita dos itens, em centavos: preço vezes unidades, antes do cupom e do desconto no Pix."},"average_order_value":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A receita dos itens por pedido, em centavos, arredondada."}},"required":["collection_id","title","path","orders","items","revenue","average_order_value"]}]}},"truncated":{"type":"boolean","description":"Há mais produtos ou coleções do que o limit."}},"required":["from","to","group_by","timezone","currency","totals","rows","truncated"]},"SearchReport":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"timezone":{"type":"string","const":"America/Sao_Paulo"},"totals":{"type":"object","properties":{"searches":{"type":"integer","minimum":0,"maximum":9007199254740991},"no_results":{"type":"integer","minimum":0,"maximum":9007199254740991},"no_results_rate":{"description":"no_results dividido por searches, de 0 a 1. Null sem buscas.","type":["number","null"]},"searches_with_click":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"discarded":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As buscas cujo termo parecia dado pessoal: contadas aqui, sem o texto, e fora das outras contagens."}},"required":["searches","no_results","no_results_rate","searches_with_click","clicks","discarded"]},"no_results":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","description":"O termo normalizado: minúsculas, sem acento, só letras e números. \"Camisetas Azúis\" vira \"camisetas azuis\"."},"searches":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As buscas pelo termo no período."},"no_results":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Das buscas, quantas não acharam nenhum produto."},"results":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Quantos produtos a última busca pelo termo achou."},"searches_with_click":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Das buscas, quantas tiveram um clique num produto do resultado."},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os cliques em produtos do resultado (o mesmo produto na mesma busca conta uma vez)."},"average_click_position":{"description":"A posição média dos produtos clicados, a partir de 1. Null sem clique.","type":["number","null"]}},"required":["term","searches","no_results","results","searches_with_click","clicks","average_click_position"]},"description":"Os termos que mais voltaram sem nenhum produto."},"top":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","description":"O termo normalizado: minúsculas, sem acento, só letras e números. \"Camisetas Azúis\" vira \"camisetas azuis\"."},"searches":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As buscas pelo termo no período."},"no_results":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Das buscas, quantas não acharam nenhum produto."},"results":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Quantos produtos a última busca pelo termo achou."},"searches_with_click":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Das buscas, quantas tiveram um clique num produto do resultado."},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os cliques em produtos do resultado (o mesmo produto na mesma busca conta uma vez)."},"average_click_position":{"description":"A posição média dos produtos clicados, a partir de 1. Null sem clique.","type":["number","null"]}},"required":["term","searches","no_results","results","searches_with_click","clicks","average_click_position"]},"description":"Os termos mais buscados."},"no_clicks":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","description":"O termo normalizado: minúsculas, sem acento, só letras e números. \"Camisetas Azúis\" vira \"camisetas azuis\"."},"searches":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"As buscas pelo termo no período."},"no_results":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Das buscas, quantas não acharam nenhum produto."},"results":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Quantos produtos a última busca pelo termo achou."},"searches_with_click":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Das buscas, quantas tiveram um clique num produto do resultado."},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Os cliques em produtos do resultado (o mesmo produto na mesma busca conta uma vez)."},"average_click_position":{"description":"A posição média dos produtos clicados, a partir de 1. Null sem clique.","type":["number","null"]}},"required":["term","searches","no_results","results","searches_with_click","clicks","average_click_position"]},"description":"Os termos mais buscados que acharam produtos e não tiveram clique: o resultado não convenceu."}},"required":["from","to","timezone","totals","no_results","top","no_clicks"]},"Shop":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"subdomain":{"type":"string"},"storefront_url":{"type":"string","format":"uri"},"domain":{"type":["string","null"]},"currency":{"type":"string","const":"BRL"},"timezone":{"type":"string","const":"America/Sao_Paulo"},"locale":{"type":"string","const":"pt-BR"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","subdomain","storefront_url","domain","currency","timezone","locale","created_at"]},"TestEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["webhook.test"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"type":"object","properties":{"webhook_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["webhook_id"]}},"required":["id","type","created_at","api_version","data"]},"Theme":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"source":{"type":"string","enum":["platform","custom"]},"platform_theme":{"type":["string","null"]},"published":{"type":"boolean"},"tree":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{32}$"},{"type":"null"}]},"errors":{"type":"integer","minimum":0,"maximum":9007199254740991},"development":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"github":{"anyOf":[{"type":"object","properties":{"repository":{"type":"string"},"branch":{"type":"string"},"folder":{"type":"string"},"url":{"type":"string"},"status":{"type":"string","enum":["active","paused"]},"last_commit":{"anyOf":[{"type":"object","properties":{"sha":{"type":"string"},"message":{"type":"string"}},"required":["sha","message"]},{"type":"null"}]},"synced_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["repository","branch","folder","url","status","last_commit","synced_at"]},{"type":"null"}]},"pull_request":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"repository":{"type":"string"},"url":{"type":"string"}},"required":["number","repository","url"]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","source","platform_theme","published","tree","errors","development","expires_at","github","pull_request","created_at","updated_at"]},"ThemeCheck":{"type":"object","properties":{"theme":{"$ref":"#/components/schemas/Theme"},"can_publish":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":["string","null"]},"file":{"type":["string","null"]},"line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end_line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end_column":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}},"required":["code","file","line","column","end_line","end_column","message","severity"]}},"content_impact":{"type":"array","items":{"type":"object","properties":{"where":{"type":"string"},"change":{"type":"string"}},"required":["where","change"]}},"missing_templates":{"type":"array","items":{"type":"object","properties":{"template":{"type":"string","enum":["product","collection","page"]},"name":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["template","name","count"]}},"live":{"anyOf":[{"type":"object","properties":{"theme_name":{"type":"string"},"published_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["theme_name","published_at"]},{"type":"null"}]}},"required":["theme","can_publish","problems","content_impact","missing_templates","live"]},"ThemeCreate":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"platform"},"platform_theme":{"type":"string","enum":["pilar","editorial","vertice","aura","colheita","estante"]},"style":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":60}},"required":["source","platform_theme"]},{"type":"object","properties":{"source":{"type":"string","const":"duplicate"},"theme_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":60}},"required":["source","theme_id"]},{"type":"object","properties":{"source":{"type":"string","const":"fork"},"theme_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":60}},"required":["source","theme_id"]}]},"ThemeEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"O id do evento: o mesmo em todas as tentativas."},"type":{"type":"string","enum":["theme.published"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Quando a mudança aconteceu."},"api_version":{"type":"string","enum":["2026-10"]},"data":{"description":"O tema publicado.","$ref":"#/components/schemas/Theme"}},"required":["id","type","created_at","api_version","data"]},"ThemeFileContent":{"type":"object","properties":{"path":{"type":"string"},"checksum":{"type":"string","pattern":"^[0-9a-f]{32}$"},"binary":{"type":"boolean"},"content":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["path","checksum","binary","content","url"]},"ThemeFiles":{"type":"object","properties":{"theme_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"read_only":{"type":"boolean"},"tree":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{32}$"},{"type":"null"}]},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"checksum":{"type":"string","pattern":"^[0-9a-f]{32}$"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"binary":{"type":"boolean"},"url":{"type":["string","null"]}},"required":["path","checksum","size","binary","url"]}},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":["string","null"]},"file":{"type":["string","null"]},"line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end_line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end_column":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}},"required":["code","file","line","column","end_line","end_column","message","severity"]}}},"required":["theme_id","read_only","tree","files","problems"]},"ThemeFilesWrite":{"type":"object","properties":{"write":{"default":[],"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string"},"base":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{32}$"},{"type":"null"}]}},"required":["path","content","base"]}},"delete":{"default":[],"maxItems":2000,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":200},"base":{"type":"string","pattern":"^[0-9a-f]{32}$"}},"required":["path","base"]}},"move":{"default":[],"maxItems":2000,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":200},"to":{"type":"string","minLength":1,"maxLength":200},"base":{"type":"string","pattern":"^[0-9a-f]{32}$"}},"required":["from","to","base"]}}}},"ThemeImport":{"type":"object","properties":{"theme":{"$ref":"#/components/schemas/Theme"},"ignored":{"type":"array","items":{"type":"string"}}},"required":["theme","ignored"]},"ThemeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Theme"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ThemePreview":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"shared":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"frozen_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","frozen_at","created_at"]},{"type":"null"}]}},"required":["url","expires_at","shared"]},"ThemePreviewCreate":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"temporary"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"shared"},"name":{"type":"string","minLength":1,"maxLength":60},"expires_in_days":{"type":"number","enum":[1,7,30]},"frozen":{"type":"boolean"}},"required":["type","name","expires_in_days","frozen"]}]},"ThemePublish":{"type":"object","properties":{"note":{"type":"string","maxLength":200}}},"ThemeUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60}},"required":["name"]},"ThemeVersion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tree":{"type":"string","pattern":"^[0-9a-f]{32}$"},"note":{"type":["string","null"]},"reason":{"type":"string","enum":["publish","manual","import","fork","before_restore","before_import"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"current":{"type":"boolean"}},"required":["id","number","tree","note","reason","created_at","current"]},"ThemeVersionCreate":{"type":"object","properties":{"note":{"type":"string","maxLength":200}}},"ThemeVersionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ThemeVersion"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"Token":{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"api_version":{"type":"string","enum":["2026-10"]},"approval_mode":{"type":"string","enum":["direct","proposal"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","api_version","approval_mode","created_at"]},{"type":"null"}]},"token":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","expires_at","created_at"]},"session":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"device":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","device","created_at","expires_at"]},{"type":"null"}]},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":["string","null"]}},"required":["id","email"]},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string","enum":["read_products","write_products","read_content","write_content","read_orders","write_orders","refund_orders","read_themes","write_themes","publish_themes","read_customers","read_reports"]}},"shop_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"rate_limit":{"type":"object","properties":{"bucket_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refill_per_second":{"type":"number"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["bucket_size","refill_per_second","expires_at"]}},"required":["integration","token","session","user","scopes","shop_id","rate_limit"]},"TryOn":{"type":"object","properties":{"type":{"type":"string","enum":["2d","3d"]},"width_mm":{"type":"number"},"adjustments":{"type":"object","properties":{"vertical_offset_mm":{"type":"number"},"tilt_degrees":{"type":"number"},"size_factor":{"type":"number"}},"required":["vertical_offset_mm","tilt_degrees","size_factor"]},"front":{"anyOf":[{"type":"object","properties":{"src":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["src","width","height"]},{"type":"null"}]},"side":{"anyOf":[{"type":"object","properties":{"src":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["src","width","height"]},{"type":"null"}]},"model":{"anyOf":[{"type":"object","properties":{"src":{"type":"string"},"triangles":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["src","triangles"]},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["type","width_mm","adjustments","front","side","model","updated_at"]},"TryOnUpdate":{"type":"object","properties":{"type":{"type":"string","enum":["2d","3d"]},"width_mm":{"type":"number","minimum":80,"maximum":200},"adjustments":{"type":"object","properties":{"vertical_offset_mm":{"type":"number","minimum":-10,"maximum":10},"tilt_degrees":{"type":"number","minimum":-5,"maximum":20},"size_factor":{"type":"number","minimum":0.8,"maximum":1.2}}},"front_url":{"type":"string","maxLength":2000},"side_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"model_url":{"type":"string","maxLength":2000}},"required":["type","width_mm"]},"Variant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"product_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"options":{"type":"array","items":{"type":"string"}},"sku":{"type":["string","null"]},"barcode":{"type":["string","null"]},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"compare_at_price":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"cost":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"inventory_quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"inventory_tracked":{"type":"boolean"},"prescription_range":{"anyOf":[{"type":"object","properties":{"sphere_min":{"type":"number"},"sphere_max":{"type":"number"},"cylinder_max":{"type":"number"},"add_min":{"default":null,"type":["number","null"]},"add_max":{"default":null,"type":["number","null"]},"base_curve":{"description":"A curva base (BC) da caixa, em mm: só na contact_lens.","type":["number","null"]},"diameter":{"description":"O diâmetro (DIA) da caixa, em mm: só na contact_lens.","type":["number","null"]}},"required":["sphere_min","sphere_max","cylinder_max"]},{"type":"null"}]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","product_id","options","sku","barcode","price","compare_at_price","cost","inventory_quantity","inventory_tracked","prescription_range","position","updated_at"]},"VariantCreate":{"type":"object","properties":{"options":{"default":[],"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"sku":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"barcode":{"type":["string","null"]},"price":{"type":"integer","minimum":0,"maximum":100000000},"compare_at_price":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]},"cost":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]},"inventory_quantity":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"prescription_range":{"default":null,"anyOf":[{"type":"object","properties":{"sphere_min":{"type":"number"},"sphere_max":{"type":"number"},"cylinder_max":{"type":"number"},"add_min":{"default":null,"type":["number","null"]},"add_max":{"default":null,"type":["number","null"]},"base_curve":{"description":"A curva base (BC) da caixa, em mm: só na contact_lens.","type":["number","null"]},"diameter":{"description":"O diâmetro (DIA) da caixa, em mm: só na contact_lens.","type":["number","null"]}},"required":["sphere_min","sphere_max","cylinder_max"]},{"type":"null"}]}},"required":["price"]},"VariantList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"VariantTryOn":{"type":"object","properties":{"product_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"variant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"try_on":{"anyOf":[{"$ref":"#/components/schemas/TryOn"},{"type":"null"}]}},"required":["product_id","variant_id","try_on"]},"VariantUpdate":{"type":"object","properties":{"options":{"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"barcode":{"type":["string","null"]},"price":{"type":"integer","minimum":0,"maximum":100000000},"compare_at_price":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]},"cost":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]},"inventory_quantity":{"type":"integer","minimum":0,"maximum":1000000},"prescription_range":{"anyOf":[{"type":"object","properties":{"sphere_min":{"type":"number"},"sphere_max":{"type":"number"},"cylinder_max":{"type":"number"},"add_min":{"default":null,"type":["number","null"]},"add_max":{"default":null,"type":["number","null"]},"base_curve":{"description":"A curva base (BC) da caixa, em mm: só na contact_lens.","type":["number","null"]},"diameter":{"description":"O diâmetro (DIA) da caixa, em mm: só na contact_lens.","type":["number","null"]}},"required":["sphere_min","sphere_max","cylinder_max"]},{"type":"null"}]}}},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["order.created","order.paid","order.updated","order.shipped","order.delivered","order.cancelled","order.anonymized","order.prescription_received","product.created","product.updated","product.deleted","inventory.updated","theme.published","customer.created","customer.updated","customer.deleted"]}},"status":{"type":"string","enum":["active","paused","disabled"],"description":"active: recebe os eventos; paused: pausado por quem integra; disabled: desligado depois de 3 dias falhando (reative com PATCH status=active)."},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Desde quando as entregas falham sem nenhuma dar certo."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","url","events","status","failing_since","created_at","updated_at"]},"WebhookCreate":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["order.created","order.paid","order.updated","order.shipped","order.delivered","order.cancelled","order.anonymized","order.prescription_received","product.created","product.updated","product.deleted","inventory.updated","theme.published","customer.created","customer.updated","customer.deleted"]}}},"required":["url","events"]},"WebhookList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"WebhookTest":{"type":"object","properties":{"delivery_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"success":{"type":"boolean"},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"O código que o endereço respondeu; null quando nem respondeu."},"error":{"type":["string","null"]},"duration_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["delivery_id","success","response_status","error","duration_ms"]},"WebhookUpdate":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["order.created","order.paid","order.updated","order.shipped","order.delivered","order.cancelled","order.anonymized","order.prescription_received","product.created","product.updated","product.deleted","inventory.updated","theme.published","customer.created","customer.updated","customer.deleted"]}},"status":{"type":"string","enum":["active","paused"]},"rotate_secret":{"type":"boolean","const":true}}},"WebhookWithSecret":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["order.created","order.paid","order.updated","order.shipped","order.delivered","order.cancelled","order.anonymized","order.prescription_received","product.created","product.updated","product.deleted","inventory.updated","theme.published","customer.created","customer.updated","customer.deleted"]}},"status":{"type":"string","enum":["active","paused","disabled"],"description":"active: recebe os eventos; paused: pausado por quem integra; disabled: desligado depois de 3 dias falhando (reative com PATCH status=active)."},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Desde quando as entregas falham sem nenhuma dar certo."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"secret":{"description":"O segredo da assinatura, só na criação e na troca. Guarde: ele não aparece de novo, nem na repetição com a mesma Idempotency-Key (troque com PATCH rotate_secret=true se perder).","type":"string"}},"required":["id","url","events","status","failing_since","created_at","updated_at"]}},"headers":{"Denaryx-Request-Id":{"description":"Identificador da chamada. Informe ao suporte quando algo der errado.","schema":{"type":"string"}},"Denaryx-Api-Version":{"description":"A versão que respondeu.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Quantas chamadas cabem no balde do token.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Quantas chamadas ainda cabem agora.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Em quantos segundos o balde fica cheio de novo.","schema":{"type":"integer"}},"Retry-After":{"description":"Em quantos segundos tentar de novo.","schema":{"type":"integer"}}},"responses":{"InvalidRequest":{"description":"A chamada veio com campos inválidos; os campos recusados vão em fields (invalid_request).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"AuthenticationError":{"description":"O token falta, não existe, foi revogado ou venceu (authentication_error).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PermissionError":{"description":"O token não tem o escopo da rota, ou, com write_content, mandou campos que pedem write_products, listados em fields (permission_error).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"O recurso não existe nesta loja (not_found).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"O estado do recurso não permite a mudança, ou ele mudou desde a leitura (conflict).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"O corpo ou o arquivo passou do tamanho máximo (invalid_request).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"O pedido é válido, mas não pode ser atendido como está (invalid_request).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Chamadas demais: espere o Retry-After (rate_limited).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"A API está ocupada com outras chamadas: espere o Retry-After (api_error).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ApiError":{"description":"Erro do nosso lado (api_error).","headers":{"Denaryx-Request-Id":{"$ref":"#/components/headers/Denaryx-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}