{
  "openapi": "3.1.0",
  "info": {
    "title": "API pública da Vello",
    "version": "1.0.0",
    "description": "API REST v1 para apps instalados nas lojas Vello. Token OAuth 2.0 (ou o token do app da loja) em `Authorization: Bearer`. A loja sai do token. Erros em RFC 9457. Política de versão: mudança aditiva entra na v1 sem aviso; quebra vira `/v2`, e a v1 continua suportada por pelo menos 12 meses depois que a v2 sair.",
    "x-version-policy": [
      "Aditiva, entra na v1 sem aviso: rota nova, campo novo na resposta, filtro novo, evento novo, valor novo em campo de texto livre.",
      "Quebra, só numa versão nova (/v2): tirar ou renomear rota, campo ou evento; mudar o tipo de um campo; tornar obrigatório o que era opcional; mudar o significado de um valor.",
      "A v1 continua suportada por pelo menos 12 meses depois que a v2 for publicada.",
      "Escreva o cliente para ignorar campo desconhecido: campo novo não é quebra."
    ],
    "x-changelog": [
      {
        "versao": "1.0.0",
        "data": "2026-10-13",
        "mudancas": [
          "Escrita: estoque, produtos, variantes, imagens por URL, categorias, cupons, clientes, envio com rastreio, status de envio, cancelamento e estorno.",
          "Idempotency-Key aceita em toda escrita e obrigatória no estoque e no estorno.",
          "Webhooks como recurso da API: criar, listar, alterar, testar, reenviar e remover.",
          "Pedido com endereços e rastreio; filtros por status; categorias na ordem da loja.",
          "Variante com `available_quantity`: o estoque que dá para vender, descontadas as reservas de pedido aguardando pagamento.",
          "Avisos de privacidade da LGPD: customer.data_request, customer.deleted e store.redact.",
          "Contrato publicado em OpenAPI 3.1, com teste de contrato contra as respostas reais."
        ]
      }
    ]
  },
  "servers": [
    {
      "url": "https://uptaehjzvnqempmsveoz.supabase.co/functions/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/api/v1/orders": {
      "get": {
        "operationId": "orders.list",
        "summary": "Lista pedidos",
        "x-permission": "read_orders",
        "description": "Permissão: `read_orders`.",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Pedidos deste cliente."
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "E-mail exato, sem diferença de caixa. Exige read_customer_contact."
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Telefone com DDD; com ou sem +55 e o nono dígito. Exige read_customer_contact."
            }
          },
          {
            "name": "document",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF ou CNPJ, com ou sem pontuação. Exige read_customer_contact; o documento nunca sai na resposta."
            }
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Criados a partir de (RFC 3339)."
            }
          },
          {
            "name": "created_at_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Criados até (RFC 3339)."
            }
          },
          {
            "name": "updated_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Alterados a partir de (RFC 3339)."
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Ciclo do pedido. Um ou mais de: open, on_hold, completed, cancelled, separados por vírgula."
            }
          },
          {
            "name": "payment_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Situação do pagamento. Um ou mais de: pending, in_review, paid, failed, expired, refunded, partially_refunded, chargeback, in_dispute, partially_paid, separados por vírgula."
            }
          },
          {
            "name": "fulfillment_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Situação do envio. Um ou mais de: unfulfilled, partial, fulfilled, in_separation, invoiced, ready_to_ship, ready_for_pickup, shipped, in_transit, partially_shipped, delivery_exception, delivered, returned, exchange_in_progress, in_production, separados por vírgula."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data", "meta"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pedido"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["next_cursor"],
                      "properties": {
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}": {
      "get": {
        "operationId": "orders.get",
        "summary": "Um pedido",
        "x-permission": "read_orders",
        "description": "Permissão: `read_orders`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Pedido"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "orders.update",
        "summary": "Muda o status de envio",
        "x-permission": "write_orders",
        "description": "Permissão: `write_orders`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoStatusDeEnvio"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Pedido"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}/fulfillments": {
      "post": {
        "operationId": "orders.fulfill",
        "summary": "Marca o envio com rastreio",
        "x-permission": "write_orders",
        "description": "Permissão: `write_orders`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoEnvio"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Pedido"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}/cancel": {
      "post": {
        "operationId": "orders.cancel",
        "summary": "Cancela o pedido (sem estorno)",
        "x-permission": "write_orders",
        "description": "Permissão: `write_orders`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoCancelamento"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Pedido"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}/refunds": {
      "post": {
        "operationId": "orders.refund",
        "summary": "Estorna pelo gateway da cobrança",
        "x-permission": "write_refunds",
        "description": "Permissão: `write_refunds`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoEstorno"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Estorno"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers": {
      "get": {
        "operationId": "customers.list",
        "summary": "Lista clientes",
        "x-permission": "read_customers",
        "description": "Permissão: `read_customers`.",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "E-mail exato, sem diferença de caixa. Exige read_customer_contact."
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Telefone com DDD; com ou sem +55 e o nono dígito. Exige read_customer_contact."
            }
          },
          {
            "name": "document",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF ou CNPJ, com ou sem pontuação. Exige read_customer_contact; o documento nunca sai na resposta."
            }
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Criados a partir de (RFC 3339)."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data", "meta"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Cliente"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["next_cursor"],
                      "properties": {
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "customers.create",
        "summary": "Cria um cliente",
        "x-permission": "write_customers",
        "description": "Permissão: `write_customers`.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoCliente"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cliente"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers/{id}": {
      "get": {
        "operationId": "customers.get",
        "summary": "Um cliente",
        "x-permission": "read_customers",
        "description": "Permissão: `read_customers`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cliente"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "customers.update",
        "summary": "Altera um cliente",
        "x-permission": "write_customers",
        "description": "Permissão: `write_customers`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoCliente"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cliente"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products": {
      "get": {
        "operationId": "products.list",
        "summary": "Lista produtos (até 50 por página)",
        "x-permission": "read_products",
        "description": "Permissão: `read_products`.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Palavras do nome, descrição, tags, SKU ou opção da variante: todas precisam aparecer, em qualquer ordem, sem acento nem caixa."
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Na categoria principal ou nas adicionais."
            }
          },
          {
            "name": "brand_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["true", "false"],
              "description": "Só ativos (true) ou só inativos (false)."
            }
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Criados a partir de (RFC 3339)."
            }
          },
          {
            "name": "updated_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Alterados a partir de (RFC 3339)."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data", "meta"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Produto"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["next_cursor"],
                      "properties": {
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "products.create",
        "summary": "Cria um produto com variantes",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoProduto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Produto"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}": {
      "get": {
        "operationId": "products.get",
        "summary": "Um produto",
        "x-permission": "read_products",
        "description": "Permissão: `read_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Produto"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "products.update",
        "summary": "Altera um produto",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoProdutoAlterado"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Produto"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/variants": {
      "post": {
        "operationId": "products.variants.create",
        "summary": "Acrescenta uma variante",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoVariante"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Produto"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/images": {
      "post": {
        "operationId": "products.images.create",
        "summary": "Acrescenta uma imagem por URL",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoImagem"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Produto"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}/images/{image_id}": {
      "delete": {
        "operationId": "products.images.delete",
        "summary": "Tira uma imagem do produto",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "image_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem corpo"
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/variants/{id}": {
      "patch": {
        "operationId": "variants.update",
        "summary": "Altera uma variante",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoVarianteAlterada"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Produto"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/variants/{id}/stock": {
      "post": {
        "operationId": "variants.stock",
        "summary": "Ajusta o estoque",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoAjusteDeEstoque"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AjusteDeEstoque"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/categories": {
      "get": {
        "operationId": "categories.list",
        "summary": "Lista categorias na ordem da loja",
        "x-permission": "read_products",
        "description": "Permissão: `read_products`.",
        "parameters": [
          {
            "name": "parent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Subcategorias desta categoria."
            }
          },
          {
            "name": "updated_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Alterados a partir de (RFC 3339)."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data", "meta"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Categoria"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["next_cursor"],
                      "properties": {
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "categories.create",
        "summary": "Cria uma categoria",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoCategoria"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Categoria"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/categories/{id}": {
      "get": {
        "operationId": "categories.get",
        "summary": "Uma categoria",
        "x-permission": "read_products",
        "description": "Permissão: `read_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Categoria"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "categories.update",
        "summary": "Altera uma categoria",
        "x-permission": "write_products",
        "description": "Permissão: `write_products`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoCategoria"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Categoria"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/coupons": {
      "get": {
        "operationId": "coupons.list",
        "summary": "Lista cupons",
        "x-permission": "read_coupons",
        "description": "Permissão: `read_coupons`.",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Código exato do cupom, sem diferença de caixa."
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["true", "false"],
              "description": "Só ativos (true) ou só inativos (false)."
            }
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Criados a partir de (RFC 3339)."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data", "meta"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Cupom"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["next_cursor"],
                      "properties": {
                        "next_cursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "coupons.create",
        "summary": "Cria um cupom",
        "x-permission": "write_coupons",
        "description": "Permissão: `write_coupons`.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoCupom"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cupom"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/coupons/{id}": {
      "get": {
        "operationId": "coupons.get",
        "summary": "Um cupom",
        "x-permission": "read_coupons",
        "description": "Permissão: `read_coupons`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cupom"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "coupons.update",
        "summary": "Altera um cupom",
        "x-permission": "write_coupons",
        "description": "Permissão: `write_coupons`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "De 1 a 255 caracteres; a resposta fica guardada 24 h, e a mesma chave com outro corpo é 422.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoCupom"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cupom"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "operationId": "webhooks.list",
        "summary": "Lista as assinaturas do app",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Assinatura"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "webhooks.create",
        "summary": "Cria uma assinatura (o segredo vem uma vez)",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoAssinatura"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AssinaturaNova"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}": {
      "get": {
        "operationId": "webhooks.get",
        "summary": "Uma assinatura",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Assinatura"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "webhooks.replace",
        "summary": "Troca URL e eventos",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoAssinatura"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Assinatura"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "webhooks.update",
        "summary": "Altera URL ou eventos",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorpoAssinatura"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Assinatura"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "webhooks.delete",
        "summary": "Remove uma assinatura",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem corpo"
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/test": {
      "post": {
        "operationId": "webhooks.test",
        "summary": "Manda um webhook.test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Entrega"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver": {
      "post": {
        "operationId": "webhooks.redeliver",
        "summary": "Reenvia uma entrega",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Entrega"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ou cabeçalho inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente, inválido ou revogado",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "403": {
            "description": "Falta a permissão (dita no `WWW-Authenticate`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra loja",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "422": {
            "description": "Corpo inválido (`invalid_params`)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          },
          "429": {
            "description": "Limite de chamadas; espere `Retry-After`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problema"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "order.created": {
      "post": {
        "summary": "pedido criado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "order.created"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Pedido"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "order.paid": {
      "post": {
        "summary": "pagamento confirmado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "order.paid"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Pedido"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "order.shipped": {
      "post": {
        "summary": "pedido enviado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "order.shipped"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Pedido"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "order.delivered": {
      "post": {
        "summary": "pedido entregue",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "order.delivered"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Pedido"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "summary": "pedido cancelado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "order.cancelled"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Pedido"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "cart.abandoned": {
      "post": {
        "summary": "carrinho abandonado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "cart.abandoned"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Carrinho"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "customer.created": {
      "post": {
        "summary": "cliente criado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "customer.created"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Cliente"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "customer.updated": {
      "post": {
        "summary": "cliente alterado (`changed_fields` no envelope)",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "customer.updated"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Cliente"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "product.created": {
      "post": {
        "summary": "produto criado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "product.created"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Produto"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "product.updated": {
      "post": {
        "summary": "produto alterado",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "product.updated"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Produto"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "product.deleted": {
      "post": {
        "summary": "produto excluído",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "product.deleted"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": ["id"],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "variant.stock_changed": {
      "post": {
        "summary": "estoque da variante mudou",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "variant.stock_changed"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/AvisoDeEstoque"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "category.created": {
      "post": {
        "summary": "categoria criada",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "category.created"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Categoria"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "category.updated": {
      "post": {
        "summary": "categoria alterada",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "category.updated"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Categoria"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "category.deleted": {
      "post": {
        "summary": "categoria excluída",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "category.deleted"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": ["id"],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "app.uninstalled": {
      "post": {
        "summary": "o lojista desinstalou o app",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "app.uninstalled"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [],
                    "properties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "webhook.test": {
      "post": {
        "summary": "teste pedido pela API",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "webhook.test"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [],
                    "properties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "customer.data_request": {
      "post": {
        "summary": "LGPD: o titular pediu os dados à loja (obrigatório)",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "customer.data_request"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "$ref": "#/components/schemas/PedidoDeDados"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "customer.deleted": {
      "post": {
        "summary": "LGPD: cliente excluído ou anonimizado (obrigatório)",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "customer.deleted"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": ["id"],
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    },
    "store.redact": {
      "post": {
        "summary": "LGPD: 30 dias depois da desinstalação, apagar tudo da loja (obrigatório)",
        "description": "Standard Webhooks: cabeçalhos `webhook-id`, `webhook-timestamp` e `webhook-signature` (HMAC-SHA256).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "version",
                  "timestamp",
                  "store_id",
                  "data"
                ],
                "properties": {
                  "type": {
                    "const": "store.redact"
                  },
                  "version": {
                    "const": "v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "store_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [],
                    "properties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recebido"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problema": {
        "type": "object",
        "description": "Erro no formato RFC 9457 (`application/problem+json`).",
        "required": ["type", "title", "status", "detail"],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "invalid_params": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["name", "reason"],
              "properties": {
                "name": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Pedido": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "number",
          "test",
          "created_at",
          "updated_at",
          "paid_at",
          "cancelled_at",
          "status",
          "payment_method",
          "source",
          "currency",
          "subtotal",
          "discount",
          "shipping",
          "total",
          "customer",
          "shipping_address",
          "billing_address",
          "items",
          "shipments"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "test": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "object",
            "additionalProperties": false,
            "required": ["lifecycle", "payment", "fulfillment"],
            "properties": {
              "lifecycle": {
                "type": "string"
              },
              "payment": {
                "type": "string"
              },
              "fulfillment": {
                "type": "string"
              }
            }
          },
          "payment_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "shipping": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "type": "object",
            "additionalProperties": false,
            "required": ["id", "name", "email", "phone", "phone_digits"],
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone_digits": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "shipping_address": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "street",
                  "number",
                  "complement",
                  "neighborhood",
                  "city",
                  "state",
                  "zip_code",
                  "country"
                ],
                "properties": {
                  "street": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "number": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "complement": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "neighborhood": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "zip_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "country": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_address": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "street",
                  "number",
                  "complement",
                  "neighborhood",
                  "city",
                  "state",
                  "zip_code",
                  "country"
                ],
                "properties": {
                  "street": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "number": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "complement": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "neighborhood": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "zip_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "country": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "product_id",
                "variant_id",
                "name",
                "variant_name",
                "sku",
                "quantity",
                "unit_price",
                "image_url"
              ],
              "properties": {
                "product_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "variant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "type": "string"
                },
                "variant_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sku": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+\\.\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "image_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "shipments": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "carrier",
                "service",
                "status",
                "tracking_code",
                "tracking_url",
                "shipped_at",
                "delivered_at",
                "estimated_delivery_date",
                "events"
              ],
              "properties": {
                "carrier": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "service": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tracking_code": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tracking_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shipped_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "delivered_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "estimated_delivery_date": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": ["date", "status", "description", "location"],
                    "properties": {
                      "date": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "location": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Cliente": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "email",
          "phone",
          "phone_digits",
          "accepts_marketing",
          "orders_count",
          "total_spent",
          "created_at",
          "addresses"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone_digits": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "accepts_marketing": {
            "type": "boolean"
          },
          "orders_count": {
            "type": "integer"
          },
          "total_spent": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "addresses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "recipient_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default": {
                  "type": "boolean"
                },
                "billing": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "Carrinho": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "created_at",
          "abandoned_at",
          "currency",
          "subtotal",
          "discount",
          "shipping",
          "total",
          "coupon_code",
          "recovery_url",
          "customer",
          "items"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "abandoned_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "shipping": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "coupon_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "recovery_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "type": "object",
            "additionalProperties": false,
            "required": ["id", "name", "email", "phone", "phone_digits"],
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone_digits": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "product_id",
                "variant_id",
                "name",
                "variant_name",
                "sku",
                "quantity",
                "unit_price",
                "image_url"
              ],
              "properties": {
                "product_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "variant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "type": "string"
                },
                "variant_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sku": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+\\.\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "image_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "Produto": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "slug",
          "url",
          "active",
          "featured",
          "description",
          "short_description",
          "tags",
          "mpn",
          "video_url",
          "category_id",
          "additional_category_ids",
          "brand",
          "seo",
          "specifications",
          "created_at",
          "updated_at",
          "published_at",
          "variants",
          "images"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "featured": {
            "type": "boolean"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "short_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mpn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "video_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "category_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "additional_category_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "brand": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": ["id", "name", "slug"],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "seo": {
            "type": "object",
            "additionalProperties": false,
            "required": ["title", "description"],
            "properties": {
              "title": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "specifications": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["label", "value"],
              "properties": {
                "label": {
                  "type": "string"
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "sku",
                "barcode",
                "name",
                "options",
                "price",
                "promotional_price",
                "stock_quantity",
                "available_quantity",
                "unlimited_stock",
                "allow_backorder",
                "in_stock",
                "active",
                "weight_kg",
                "height_cm",
                "width_cm",
                "length_cm",
                "position"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sku": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "barcode": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": ["name", "value"],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                "price": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+\\.\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "promotional_price": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+\\.\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stock_quantity": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Estoque físico. Já desconta pedido pago; não desconta a reserva de pedido aguardando pagamento."
                },
                "available_quantity": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "O que dá para vender agora: o físico menos as reservas de pedido aguardando pagamento. Nulo com estoque ilimitado."
                },
                "unlimited_stock": {
                  "type": "boolean"
                },
                "allow_backorder": {
                  "type": "boolean"
                },
                "in_stock": {
                  "type": "boolean"
                },
                "active": {
                  "type": "boolean"
                },
                "weight_kg": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "height_cm": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "width_cm": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "length_cm": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "position": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "url",
                "alt",
                "position",
                "primary",
                "width",
                "height",
                "variant_ids"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "url": {
                  "type": "string"
                },
                "alt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "position": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "primary": {
                  "type": "boolean"
                },
                "width": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "height": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "variant_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        }
      },
      "Categoria": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "slug",
          "url",
          "description",
          "parent_id",
          "image_url",
          "active",
          "position",
          "seo",
          "products_count",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "position": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "seo": {
            "type": "object",
            "additionalProperties": false,
            "required": ["title", "description"],
            "properties": {
              "title": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "products_count": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Cupom": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "code",
          "description",
          "type",
          "value",
          "applies_to",
          "category_ids",
          "product_ids",
          "minimum_subtotal",
          "max_discount",
          "usage_limit",
          "usage_limit_per_customer",
          "times_used",
          "first_purchase_only",
          "combinable",
          "starts_at",
          "ends_at",
          "active",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "enum": ["percentage", "fixed_amount"]
          },
          "value": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "applies_to": {
            "type": "string"
          },
          "category_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "product_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "minimum_subtotal": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_discount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+\\.\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "usage_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "usage_limit_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "times_used": {
            "type": "integer"
          },
          "first_purchase_only": {
            "type": "boolean"
          },
          "combinable": {
            "type": "boolean"
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AjusteDeEstoque": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "variant_id",
          "product_id",
          "sku",
          "previous_quantity",
          "quantity",
          "in_stock"
        ],
        "properties": {
          "variant_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_quantity": {
            "type": "integer"
          },
          "quantity": {
            "type": "integer"
          },
          "in_stock": {
            "type": "boolean"
          }
        }
      },
      "Estorno": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "order_id",
          "amount",
          "partial",
          "status",
          "gateway_refund_id",
          "reason"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{2}$"
          },
          "partial": {
            "type": "boolean"
          },
          "status": {
            "const": "completed"
          },
          "gateway_refund_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Assinatura": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "url",
          "events",
          "from_app_settings",
          "status",
          "disabled_at",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "from_app_settings": {
            "type": "boolean"
          },
          "status": {
            "enum": ["active", "disabled"]
          },
          "disabled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AssinaturaNova": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "url",
          "events",
          "from_app_settings",
          "status",
          "disabled_at",
          "created_at",
          "secret"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "from_app_settings": {
            "type": "boolean"
          },
          "status": {
            "enum": ["active", "disabled"]
          },
          "disabled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "secret": {
            "type": "string",
            "pattern": "^whsec_"
          }
        }
      },
      "Entrega": {
        "type": "object",
        "additionalProperties": false,
        "required": ["delivery_id"],
        "properties": {
          "delivery_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AvisoDeEstoque": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "variant_id",
          "product_id",
          "sku",
          "name",
          "previous_quantity",
          "quantity",
          "previous_in_stock",
          "in_stock",
          "unlimited_stock"
        ],
        "properties": {
          "variant_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_quantity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_in_stock": {
            "type": "boolean"
          },
          "in_stock": {
            "type": "boolean"
          },
          "unlimited_stock": {
            "type": "boolean"
          }
        }
      },
      "PedidoDeDados": {
        "type": "object",
        "additionalProperties": false,
        "required": ["customer"],
        "properties": {
          "customer": {
            "type": "object",
            "additionalProperties": false,
            "required": ["id"],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "orders_requested": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "CorpoStatusDeEnvio": {
        "type": "object",
        "additionalProperties": false,
        "required": ["fulfillment_status"],
        "properties": {
          "fulfillment_status": {
            "type": "string"
          }
        }
      },
      "CorpoEnvio": {
        "type": "object",
        "additionalProperties": false,
        "required": ["tracking_code"],
        "properties": {
          "tracking_code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9-]{8,50}$"
          },
          "tracking_url": {
            "type": "string",
            "pattern": "^https?://"
          },
          "carrier": {
            "type": "string"
          }
        }
      },
      "CorpoCancelamento": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "CorpoEstorno": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "CorpoCliente": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "document": {
            "type": "string"
          }
        }
      },
      "CorpoVariante": {
        "type": "object",
        "additionalProperties": false,
        "required": ["sku", "price"],
        "properties": {
          "sku": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^\\d+(\\.\\d{1,2})?$"
              }
            ]
          },
          "promotional_price": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_price": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "stock_quantity": {
            "type": "integer"
          },
          "unlimited_stock": {
            "type": "boolean"
          },
          "allow_backorder": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "weight_kg": {
            "type": "number"
          },
          "height_cm": {
            "type": "number"
          },
          "width_cm": {
            "type": "number"
          },
          "length_cm": {
            "type": "number"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["name", "value"],
              "properties": {
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CorpoVarianteAlterada": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "sku": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^\\d+(\\.\\d{1,2})?$"
              }
            ]
          },
          "promotional_price": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_price": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "allow_backorder": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "weight_kg": {
            "type": "number"
          },
          "height_cm": {
            "type": "number"
          },
          "width_cm": {
            "type": "number"
          },
          "length_cm": {
            "type": "number"
          }
        }
      },
      "CorpoProduto": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "category_id", "variants"],
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category_id": {
            "type": "string",
            "format": "uuid"
          },
          "additional_category_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "active": {
            "type": "boolean"
          },
          "featured": {
            "type": "boolean"
          },
          "mpn": {
            "type": "string"
          },
          "video_url": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "seo": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorpoVariante"
            },
            "minItems": 1,
            "maxItems": 250
          }
        }
      },
      "CorpoProdutoAlterado": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category_id": {
            "type": "string",
            "format": "uuid"
          },
          "additional_category_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "active": {
            "type": "boolean"
          },
          "featured": {
            "type": "boolean"
          },
          "mpn": {
            "type": "string"
          },
          "video_url": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "seo": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            }
          }
        }
      },
      "CorpoImagem": {
        "type": "object",
        "additionalProperties": false,
        "required": ["src"],
        "properties": {
          "src": {
            "type": "string",
            "pattern": "^https://",
            "maxLength": 2048
          },
          "alt": {
            "type": "string",
            "maxLength": 255
          },
          "position": {
            "type": "integer"
          },
          "primary": {
            "type": "boolean"
          }
        }
      },
      "CorpoAjusteDeEstoque": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": ["adjustment"],
            "properties": {
              "adjustment": {
                "type": "integer"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": ["quantity"],
            "properties": {
              "quantity": {
                "type": "integer"
              }
            }
          }
        ]
      },
      "CorpoCategoria": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "position": {
            "type": "integer"
          },
          "seo": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            }
          }
        }
      },
      "CorpoCupom": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{3,50}$"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "enum": ["percentage", "fixed_amount"]
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^\\d+(\\.\\d{1,2})?$"
              }
            ]
          },
          "applies_to": {
            "enum": ["all", "specific_categories", "specific_products"]
          },
          "category_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "product_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "minimum_subtotal": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "max_discount": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d{1,2})?$"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "usage_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "usage_limit_per_customer": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "first_purchase_only": {
            "type": "boolean"
          },
          "combinable": {
            "type": "boolean"
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "CorpoAssinatura": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "pattern": "^https://",
            "maxLength": 2048
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
