{
  "openapi": "3.1.0",
  "info": {
    "title": "Pappitas API",
    "version": "2026-10",
    "description": "API pública de Pappitas para plataformas de dropshipping, logística y marketing.",
    "x-en": {
      "description": "Pappitas public API for dropshipping, logistics and marketing platforms."
    },
    "contact": {
      "name": "Pappitas",
      "email": "hola@pappitas.com",
      "url": "https://pappitas.com"
    },
    "x-pt": {
      "description": "API pública da Pappitas para plataformas de dropshipping, logística e marketing."
    }
  },
  "servers": [
    {
      "url": "https://app.pappitas.com/api/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Cuenta",
      "x-en": "Account",
      "x-pt": "Conta"
    },
    {
      "name": "Tiendas",
      "x-en": "Stores",
      "x-pt": "Lojas"
    },
    {
      "name": "Productos",
      "x-en": "Products",
      "x-pt": "Produtos"
    },
    {
      "name": "Inventario",
      "x-en": "Inventory",
      "x-pt": "Estoque"
    },
    {
      "name": "Pedidos",
      "x-en": "Orders",
      "x-pt": "Pedidos"
    },
    {
      "name": "Envíos",
      "x-en": "Fulfillments",
      "x-pt": "Envios"
    },
    {
      "name": "Clientes",
      "x-en": "Customers",
      "x-pt": "Clientes"
    },
    {
      "name": "Webhooks",
      "x-en": "Webhooks",
      "x-pt": "Webhooks"
    },
    {
      "name": "Pruebas",
      "x-en": "Testing",
      "x-pt": "Testes"
    }
  ],
  "paths": {
    "/token": {
      "get": {
        "tags": [
          "Cuenta"
        ],
        "summary": "Ver el token actual",
        "description": "Devuelve los permisos del token y la cuenta a la que pertenece. Útil para verificar la conexión.",
        "x-en": {
          "summary": "Inspect current token",
          "description": "Returns the token scopes and the account it belongs to. Handy to verify a connection."
        },
        "operationId": "get_token",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Token"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        },
        "x-pt": {
          "summary": "Ver o token atual",
          "description": "Devolve as permissões do token e a conta a que pertence. Útil para verificar uma conexão."
        }
      }
    },
    "/shop": {
      "get": {
        "tags": [
          "Cuenta"
        ],
        "summary": "Cuenta y tiendas",
        "description": "La cuenta autorizada y todas sus tiendas.",
        "x-en": {
          "summary": "Account and stores",
          "description": "The authorized account and all its stores."
        },
        "operationId": "get_shop",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "account": {
                          "type": "object"
                        },
                        "stores": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Store"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_store",
        "x-pt": {
          "summary": "Conta e lojas",
          "description": "A conta autorizada e todas as suas lojas."
        }
      }
    },
    "/stores": {
      "get": {
        "tags": [
          "Tiendas"
        ],
        "summary": "Listar tiendas",
        "description": "",
        "x-en": {
          "summary": "List stores",
          "description": ""
        },
        "operationId": "get_stores",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Store"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_store",
        "x-pt": {
          "summary": "Listar lojas",
          "description": ""
        }
      }
    },
    "/stores/{id}": {
      "get": {
        "tags": [
          "Tiendas"
        ],
        "summary": "Ver una tienda",
        "description": "",
        "x-en": {
          "summary": "Get a store",
          "description": ""
        },
        "operationId": "get_stores_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Store"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_store",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Ver uma loja",
          "description": ""
        }
      }
    },
    "/products": {
      "get": {
        "tags": [
          "Productos"
        ],
        "summary": "Listar productos",
        "description": "Del más nuevo al más viejo. Filtrá por SKU o external_id para encontrar tus productos importados.",
        "x-en": {
          "summary": "List products",
          "description": "Newest first. Filter by SKU or external_id to find products you imported."
        },
        "operationId": "get_products",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Product"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_products",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Cantidad por página (1–100).",
            "x-en": "Page size (1–100).",
            "x-pt": "Tamanho da página (1–100)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Valor de meta.next_cursor para la página siguiente.",
            "x-en": "meta.next_cursor from the previous page.",
            "x-pt": "meta.next_cursor da página anterior."
          },
          {
            "name": "store_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Solo de esta tienda.",
            "x-en": "Only from this store.",
            "x-pt": "Só desta loja."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "draft"
              ]
            },
            "description": "Estado.",
            "x-en": "Status.",
            "x-pt": "Status."
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "IDs separados por coma (hasta 100).",
            "x-en": "Comma-separated IDs (up to 100).",
            "x-pt": "IDs separados por vírgula (até 100)."
          },
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "SKU exacto.",
            "x-en": "Exact SKU.",
            "x-pt": "SKU exato."
          },
          {
            "name": "external_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ID en tu plataforma.",
            "x-en": "ID in your platform.",
            "x-pt": "ID na sua plataforma."
          },
          {
            "name": "updated_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Cambiados desde esta fecha.",
            "x-en": "Changed since this date.",
            "x-pt": "Alterados desde esta data."
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Creados desde esta fecha.",
            "x-en": "Created since this date.",
            "x-pt": "Criados desde esta data."
          }
        ],
        "x-pt": {
          "summary": "Listar produtos",
          "description": "Do mais novo ao mais antigo. Filtre por SKU ou external_id para encontrar os produtos que você importou."
        }
      },
      "post": {
        "tags": [
          "Productos"
        ],
        "summary": "Crear un producto",
        "description": "Importa un producto de tu catálogo a la tienda del vendedor. Respeta los límites de su plan. Mismo external_id en la misma tienda = 409.",
        "x-en": {
          "summary": "Create a product",
          "description": "Imports a product from your catalog into the seller store. Plan limits apply. Same external_id in the same store = 409."
        },
        "operationId": "post_products",
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_products",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          }
        },
        "x-pt": {
          "summary": "Criar um produto",
          "description": "Importa um produto do seu catálogo para a loja do vendedor. Os limites do plano se aplicam. Mesmo external_id na mesma loja = 409."
        }
      }
    },
    "/products/{id}": {
      "get": {
        "tags": [
          "Productos"
        ],
        "summary": "Ver un producto",
        "description": "",
        "x-en": {
          "summary": "Get a product",
          "description": ""
        },
        "operationId": "get_products_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_products",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Ver um produto",
          "description": ""
        }
      },
      "patch": {
        "tags": [
          "Productos"
        ],
        "summary": "Editar un producto",
        "description": "Solo cambia los campos que envíes.",
        "x-en": {
          "summary": "Update a product",
          "description": "Only the fields you send are changed."
        },
        "operationId": "patch_products_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Product"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_products",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          }
        },
        "x-pt": {
          "summary": "Atualizar um produto",
          "description": "Só os campos que você envia são alterados."
        }
      },
      "delete": {
        "tags": [
          "Productos"
        ],
        "summary": "Borrar un producto",
        "description": "",
        "x-en": {
          "summary": "Delete a product",
          "description": ""
        },
        "operationId": "delete_products_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "deleted": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_products",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Excluir um produto",
          "description": ""
        }
      }
    },
    "/products/{id}/inventory": {
      "get": {
        "tags": [
          "Inventario"
        ],
        "summary": "Ver stock",
        "description": "",
        "x-en": {
          "summary": "Get stock",
          "description": ""
        },
        "operationId": "get_products_id_inventory",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "product_id": {
                          "type": "integer"
                        },
                        "tracked": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_inventory",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Ver estoque",
          "description": ""
        }
      },
      "put": {
        "tags": [
          "Inventario"
        ],
        "summary": "Fijar o ajustar stock",
        "description": "Enviá quantity (valor exacto) o adjust (suma o resta). Con stock en 0 la tienda lo muestra agotado.",
        "x-en": {
          "summary": "Set or adjust stock",
          "description": "Send quantity (exact value) or adjust (add/subtract). At 0 the store shows it as sold out."
        },
        "operationId": "put_products_id_inventory",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_inventory",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quantity": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "adjust": {
                    "type": "integer"
                  },
                  "tracked": {
                    "type": "boolean"
                  }
                },
                "examples": [
                  {
                    "quantity": 30
                  },
                  {
                    "adjust": -2
                  }
                ]
              }
            }
          }
        },
        "x-pt": {
          "summary": "Definir ou ajustar estoque",
          "description": "Envie quantity (valor exato) ou adjust (somar/subtrair). Em 0 a loja mostra como esgotado."
        }
      }
    },
    "/inventory/set": {
      "post": {
        "tags": [
          "Inventario"
        ],
        "summary": "Stock en lote",
        "description": "Hasta 100 productos por llamada, por product_id, sku o external_id. Cada elemento responde por separado.",
        "x-en": {
          "summary": "Bulk stock update",
          "description": "Up to 100 products per call, by product_id, sku or external_id. Each item reports its own result."
        },
        "operationId": "post_inventory_set",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_inventory",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "properties": {
                        "product_id": {
                          "type": "integer"
                        },
                        "sku": {
                          "type": "string"
                        },
                        "external_id": {
                          "type": "string"
                        },
                        "quantity": {
                          "type": "integer"
                        },
                        "adjust": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "items": [
                      {
                        "sku": "DRP-123",
                        "quantity": 12
                      },
                      {
                        "external_id": "9981",
                        "adjust": -1
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "x-pt": {
          "summary": "Atualizar estoque em massa",
          "description": "Até 100 produtos por chamada, por product_id, sku ou external_id. Cada item informa seu próprio resultado."
        }
      }
    },
    "/orders": {
      "get": {
        "tags": [
          "Pedidos"
        ],
        "summary": "Listar pedidos",
        "description": "Del más nuevo al más viejo. Para sincronizar, usá since_id (del más viejo al más nuevo) o updated_at_min. Los pedidos de prueba se excluyen salvo include_test=1.",
        "x-en": {
          "summary": "List orders",
          "description": "Newest first. To sync, use since_id (oldest to newest) or updated_at_min. Test orders are excluded unless include_test=1."
        },
        "operationId": "get_orders",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_orders",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Cantidad por página (1–100).",
            "x-en": "Page size (1–100).",
            "x-pt": "Tamanho da página (1–100)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Valor de meta.next_cursor para la página siguiente.",
            "x-en": "meta.next_cursor from the previous page.",
            "x-pt": "meta.next_cursor da página anterior."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Uno o varios separados por coma: open, contacted, confirmed, shipped, delivered, cancelled, returned.",
            "x-en": "One or more, comma-separated: open, contacted, confirmed, shipped, delivered, cancelled, returned.",
            "x-pt": "Um ou vários separados por vírgula: open, contacted, confirmed, shipped, delivered, cancelled, returned."
          },
          {
            "name": "financial_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "paid",
                "failed",
                "refunded"
              ]
            },
            "description": "Estado del pago.",
            "x-en": "Payment status.",
            "x-pt": "Status do pagamento."
          },
          {
            "name": "fulfillment_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Estado del envío, o \"unfulfilled\" para los que no tienen guía.",
            "x-en": "Shipping status, or \"unfulfilled\" for orders without tracking.",
            "x-pt": "Status do envio, ou \"unfulfilled\" para os que não têm rastreio."
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Pedidos de este producto.",
            "x-en": "Orders for this product.",
            "x-pt": "Pedidos deste produto."
          },
          {
            "name": "since_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Pedidos con ID mayor (orden ascendente).",
            "x-en": "Orders with a higher ID (ascending order).",
            "x-pt": "Pedidos com ID maior (ordem crescente)."
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Creados desde.",
            "x-en": "Created since.",
            "x-pt": "Criados desde."
          },
          {
            "name": "created_at_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Creados hasta.",
            "x-en": "Created until.",
            "x-pt": "Criados até."
          },
          {
            "name": "updated_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Cambiados desde.",
            "x-en": "Changed since.",
            "x-pt": "Alterados desde."
          },
          {
            "name": "include_test",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            },
            "description": "Incluir pedidos de prueba.",
            "x-en": "Include test orders.",
            "x-pt": "Incluir pedidos de teste."
          }
        ],
        "x-pt": {
          "summary": "Listar pedidos",
          "description": "Do mais novo ao mais antigo. Para sincronizar, use since_id (do mais antigo ao mais novo) ou updated_at_min. Os pedidos de teste ficam de fora, exceto com include_test=1."
        }
      }
    },
    "/orders/{id}": {
      "get": {
        "tags": [
          "Pedidos"
        ],
        "summary": "Ver un pedido",
        "description": "",
        "x-en": {
          "summary": "Get an order",
          "description": ""
        },
        "operationId": "get_orders_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Ver um pedido",
          "description": ""
        }
      },
      "patch": {
        "tags": [
          "Pedidos"
        ],
        "summary": "Actualizar un pedido",
        "description": "Estado, pago, tu referencia (external_ref), nota o dirección corregida. El vendedor lo ve al instante en su panel.",
        "x-en": {
          "summary": "Update an order",
          "description": "Status, payment, your reference (external_ref), note or corrected address. The seller sees it instantly."
        },
        "operationId": "patch_orders_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "contacted",
                      "confirmed",
                      "shipped",
                      "delivered",
                      "cancelled",
                      "returned"
                    ]
                  },
                  "financial_status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "paid",
                      "failed",
                      "refunded"
                    ]
                  },
                  "external_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shipping_address": {
                    "$ref": "#/components/schemas/ShippingAddress"
                  }
                },
                "examples": [
                  {
                    "status": "confirmed",
                    "external_ref": "DROPI-55501"
                  }
                ]
              }
            }
          }
        },
        "x-pt": {
          "summary": "Atualizar um pedido",
          "description": "Status, pagamento, sua referência (external_ref), observação ou endereço corrigido. O vendedor vê na hora."
        }
      }
    },
    "/orders/{id}/cancel": {
      "post": {
        "tags": [
          "Pedidos"
        ],
        "summary": "Cancelar un pedido",
        "description": "",
        "x-en": {
          "summary": "Cancel an order",
          "description": ""
        },
        "operationId": "post_orders_id_cancel",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  }
                }
              }
            }
          }
        },
        "x-pt": {
          "summary": "Cancelar um pedido",
          "description": ""
        }
      }
    },
    "/orders/{id}/fulfillments": {
      "get": {
        "tags": [
          "Envíos"
        ],
        "summary": "Listar envíos de un pedido",
        "description": "",
        "x-en": {
          "summary": "List order fulfillments",
          "description": ""
        },
        "operationId": "get_orders_id_fulfillments",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Fulfillment"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Listar os envios de um pedido",
          "description": ""
        }
      },
      "post": {
        "tags": [
          "Envíos"
        ],
        "summary": "Cargar guía de envío",
        "description": "Guía, transportadora y estado. El pedido pasa solo a \"shipped\" (en camino) o \"delivered\". Si es contra entrega y se entrega, queda pagado.",
        "x-en": {
          "summary": "Create a fulfillment",
          "description": "Tracking, carrier and status. The order moves to shipped or delivered automatically. Cash-on-delivery orders become paid when delivered."
        },
        "operationId": "post_orders_id_fulfillments",
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Fulfillment"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_fulfillments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfillmentInput"
              }
            }
          }
        },
        "x-pt": {
          "summary": "Criar um envio",
          "description": "Rastreio, transportadora e status. O pedido passa para enviado ou entregue automaticamente. Pedidos com pagamento na entrega ficam pagos ao serem entregues."
        }
      }
    },
    "/fulfillments/{id}": {
      "patch": {
        "tags": [
          "Envíos"
        ],
        "summary": "Actualizar un envío",
        "description": "Cambiá el estado a medida que avanza: in_transit → out_for_delivery → delivered (o failed / returned).",
        "x-en": {
          "summary": "Update a fulfillment",
          "description": "Update the status as it moves: in_transit → out_for_delivery → delivered (or failed / returned)."
        },
        "operationId": "patch_fulfillments_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Fulfillment"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "write_fulfillments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfillmentInput"
              }
            }
          }
        },
        "x-pt": {
          "summary": "Atualizar um envio",
          "description": "Atualize o status conforme ele avança: in_transit → out_for_delivery → delivered (ou failed / returned)."
        }
      }
    },
    "/customers": {
      "get": {
        "tags": [
          "Clientes"
        ],
        "summary": "Listar clientes",
        "description": "",
        "x-en": {
          "summary": "List customers",
          "description": ""
        },
        "operationId": "get_customers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_customers",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Cantidad por página (1–100).",
            "x-en": "Page size (1–100).",
            "x-pt": "Tamanho da página (1–100)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Valor de meta.next_cursor para la página siguiente.",
            "x-en": "meta.next_cursor from the previous page.",
            "x-pt": "meta.next_cursor da página anterior."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Correo exacto.",
            "x-en": "Exact email.",
            "x-pt": "E-mail exato."
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Termina en estos dígitos.",
            "x-en": "Ends with these digits.",
            "x-pt": "Termina com estes dígitos."
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "País (ISO-2).",
            "x-en": "Country (ISO-2).",
            "x-pt": "País (ISO-2)."
          },
          {
            "name": "updated_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Cambiados desde.",
            "x-en": "Changed since.",
            "x-pt": "Alterados desde."
          }
        ],
        "x-pt": {
          "summary": "Listar clientes",
          "description": ""
        }
      }
    },
    "/customers/{id}": {
      "get": {
        "tags": [
          "Clientes"
        ],
        "summary": "Ver un cliente",
        "description": "",
        "x-en": {
          "summary": "Get a customer",
          "description": ""
        },
        "operationId": "get_customers_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_customers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Ver um cliente",
          "description": ""
        }
      }
    },
    "/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Listar webhooks",
        "description": "Los webhooks de este token (o de tu app).",
        "x-en": {
          "summary": "List webhooks",
          "description": "Webhooks owned by this token (or your app)."
        },
        "operationId": "get_webhooks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-pt": {
          "summary": "Listar webhooks",
          "description": "Webhooks deste token (ou do seu app)."
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Crear un webhook",
        "description": "URL https pública. Máximo 10 por token o app. El secreto se devuelve una sola vez.",
        "x-en": {
          "summary": "Create a webhook",
          "description": "Public https URL. Up to 10 per token or app. The secret is returned once."
        },
        "operationId": "post_webhooks",
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Webhook"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "events"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order.created",
                        "order.updated",
                        "order.cancelled",
                        "fulfillment.created",
                        "fulfillment.updated",
                        "product.created",
                        "product.updated",
                        "product.deleted",
                        "*"
                      ]
                    }
                  }
                },
                "examples": [
                  {
                    "url": "https://api.tu-plataforma.com/pappitas/webhooks",
                    "events": [
                      "order.created",
                      "order.updated",
                      "order.cancelled"
                    ]
                  }
                ]
              }
            }
          }
        },
        "x-pt": {
          "summary": "Criar um webhook",
          "description": "URL https pública. Até 10 por token ou app. O segredo é devolvido uma única vez."
        }
      }
    },
    "/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Ver un webhook",
        "description": "",
        "x-en": {
          "summary": "Get a webhook",
          "description": ""
        },
        "operationId": "get_webhooks_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Webhook"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Ver um webhook",
          "description": ""
        }
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Editar un webhook",
        "description": "",
        "x-en": {
          "summary": "Update a webhook",
          "description": ""
        },
        "operationId": "patch_webhooks_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Webhook"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "active": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "x-pt": {
          "summary": "Atualizar um webhook",
          "description": ""
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Borrar un webhook",
        "description": "",
        "x-en": {
          "summary": "Delete a webhook",
          "description": ""
        },
        "operationId": "delete_webhooks_id",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Excluir um webhook",
          "description": ""
        }
      }
    },
    "/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Enviar un aviso de prueba",
        "description": "Manda un evento firmado de prueba y te devuelve qué respondió tu servidor.",
        "x-en": {
          "summary": "Send a test event",
          "description": "Sends a signed test event and returns what your server answered."
        },
        "operationId": "post_webhooks_id_test",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "ID"
          }
        ],
        "x-pt": {
          "summary": "Enviar um evento de teste",
          "description": "Envia um evento de teste assinado e devolve o que o seu servidor respondeu."
        }
      }
    },
    "/test/orders": {
      "post": {
        "tags": [
          "Pruebas"
        ],
        "summary": "Crear un pedido de prueba",
        "description": "Crea un pedido contra entrega marcado \"test\": true y dispara order.created. Ideal para probar tu integración de punta a punta.",
        "x-en": {
          "summary": "Create a test order",
          "description": "Creates a cash-on-delivery order flagged test: true and fires order.created. Ideal to test your integration end to end."
        },
        "operationId": "post_test_orders",
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        },
        "x-scope": "read_orders",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "integer"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  }
                },
                "examples": [
                  {
                    "product_id": 123,
                    "quantity": 2
                  }
                ]
              }
            }
          }
        },
        "x-pt": {
          "summary": "Criar um pedido de teste",
          "description": "Cria um pedido com pagamento na entrega marcado test: true e dispara order.created. Ideal para testar sua integração de ponta a ponta."
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ppt_live_…",
        "description": "Authorization: Bearer ppt_live_… (o X-Pappitas-Access-Token)."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 8,
          "maxLength": 80
        },
        "description": "Repetí la misma clave al reintentar y no se crea nada dos veces.",
        "x-en": "Reuse the same key when retrying so nothing is created twice.",
        "x-pt": "Reutilize a mesma chave ao tentar de novo para que nada seja criado duas vezes."
      }
    },
    "responses": {
      "E401": {
        "description": "Token faltante o inválido",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "x-en": "Missing or invalid token",
        "x-pt": "Token ausente ou inválido"
      },
      "E402": {
        "description": "El plan de la cuenta no lo permite",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "x-en": "The account plan does not allow it",
        "x-pt": "O plano da conta não permite"
      },
      "E403": {
        "description": "Falta un permiso (scope)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "x-en": "A scope is missing",
        "x-pt": "Falta uma permissão (scope)"
      },
      "E404": {
        "description": "No existe o no es de esta cuenta",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "x-en": "Does not exist or is not from this account",
        "x-pt": "Não existe ou não é desta conta"
      },
      "E409": {
        "description": "Conflicto (duplicado o estado que no lo permite)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "x-en": "Conflict (duplicate or a status that does not allow it)",
        "x-pt": "Conflito (duplicado ou status que não permite)"
      },
      "E422": {
        "description": "Datos inválidos",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "x-en": "Invalid data",
        "x-pt": "Dados inválidos"
      },
      "E429": {
        "description": "Límite de llamadas superado",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "x-en": "Rate limit exceeded",
        "x-pt": "Limite de chamadas excedido"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "request_id"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "examples": [
                  "validation_failed"
                ]
              },
              "message": {
                "type": "string",
                "examples": [
                  "Revisá los datos enviados."
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": true,
                "examples": [
                  {
                    "price": "Número mayor o igual a 0."
                  }
                ]
              }
            }
          },
          "request_id": {
            "type": "string",
            "examples": [
              "8546405f44c92bfa"
            ]
          }
        }
      },
      "ListMeta": {
        "type": "object",
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "aWQ6MTIz"
            ]
          },
          "limit": {
            "type": "integer",
            "examples": [
              25
            ]
          },
          "next_since_id": {
            "type": "integer",
            "description": "Solo con ?since_id=",
            "x-en": "Only with ?since_id=",
            "x-pt": "Só com ?since_id="
          }
        }
      },
      "Store": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "examples": [
              1
            ]
          },
          "name": {
            "type": "string",
            "examples": [
              "Tienda Uno"
            ]
          },
          "handle": {
            "type": "string",
            "examples": [
              "tienda-uno"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "draft"
            ]
          },
          "currency": {
            "type": "string",
            "examples": [
              "USD"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "PA"
            ]
          },
          "domain": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "mitienda.com"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          }
        }
      },
      "Image": {
        "type": "object",
        "properties": {
          "position": {
            "type": "integer"
          },
          "src": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Variant": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "examples": [
              0
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Talla M"
            ]
          },
          "price": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "FAJA-M"
            ]
          }
        }
      },
      "Inventory": {
        "type": "object",
        "properties": {
          "tracked": {
            "type": "boolean"
          },
          "quantity": {
            "type": [
              "integer",
              "null"
            ],
            "examples": [
              40
            ]
          }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "examples": [
              123
            ]
          },
          "store_id": {
            "type": "integer",
            "examples": [
              1
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Faja moldeadora"
            ]
          },
          "handle": {
            "type": "string",
            "examples": [
              "faja-moldeadora"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "draft"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "benefits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          },
          "compare_at_price": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "49.00"
            ]
          },
          "currency": {
            "type": "string",
            "examples": [
              "USD"
            ]
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "DRP-123"
            ]
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "dropi"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "9981"
            ]
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Image"
            }
          },
          "video_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "has_variants": {
            "type": "boolean"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Variant"
            }
          },
          "inventory": {
            "$ref": "#/components/schemas/Inventory"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          }
        }
      },
      "ProductInput": {
        "type": "object",
        "properties": {
          "store_id": {
            "type": "integer",
            "description": "Si no se envía, se usa la primera tienda de la cuenta.",
            "x-en": "If not sent, the account's first store is used.",
            "x-pt": "Se não for enviado, usa-se a primeira loja da conta."
          },
          "title": {
            "type": "string",
            "maxLength": 190
          },
          "handle": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "minimum": 0
          },
          "compare_at_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "draft"
            ],
            "default": "active"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tu plataforma, ej. \"dropi\".",
            "x-en": "Your platform, e.g. \"dropi\".",
            "x-pt": "Sua plataforma, ex. \"dropi\"."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID del producto en tu plataforma. No se permiten duplicados por tienda.",
            "x-en": "Product ID in your platform. Duplicates per store are not allowed.",
            "x-pt": "ID do produto na sua plataforma. Não são permitidos duplicados por loja."
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "maxItems": 12,
            "description": "URLs https. La primera es la principal.",
            "x-en": "https URLs. The first one is the main image.",
            "x-pt": "URLs https. A primeira é a principal."
          },
          "video_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "benefits": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 12
          },
          "variants": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "object",
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "sku": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "inventory": {
            "type": "object",
            "properties": {
              "tracked": {
                "type": "boolean"
              },
              "quantity": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              }
            }
          }
        },
        "examples": [
          {
            "title": "Faja moldeadora",
            "price": 29.9,
            "compare_at_price": 49,
            "sku": "DRP-123",
            "external_source": "dropi",
            "external_id": "9981",
            "images": [
              "https://cdn.tu-plataforma.com/faja-1.jpg"
            ],
            "variants": [
              {
                "title": "S"
              },
              {
                "title": "M",
                "price": 31
              }
            ],
            "inventory": {
              "quantity": 40
            }
          }
        ]
      },
      "ShippingAddress": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "country_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "province": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "district": {
            "type": [
              "string",
              "null"
            ]
          },
          "address1": {
            "type": [
              "string",
              "null"
            ]
          },
          "address2": {
            "type": [
              "string",
              "null"
            ]
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "examples": [
          {
            "name": "Ana Ruiz",
            "phone": "50760001111",
            "email": null,
            "country_code": "PA",
            "province": "Panamá Oeste",
            "city": "Arraiján",
            "district": null,
            "address1": "Calle 5, casa 12",
            "address2": null,
            "zip": null,
            "notes": "Cerca del super"
          }
        ]
      },
      "LineItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "product",
              "upsell"
            ]
          },
          "product_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "variant_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "option": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "Lleva 2"
            ]
          },
          "quantity": {
            "type": "integer",
            "examples": [
              2
            ]
          },
          "unit_price": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          },
          "total": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          }
        }
      },
      "Fulfillment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "order_id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_transit",
              "out_for_delivery",
              "delivered",
              "failed",
              "returned",
              "cancelled"
            ]
          },
          "carrier": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "Servientrega"
            ]
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "SV123456"
            ]
          },
          "tracking_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "app_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          }
        }
      },
      "FulfillmentInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_transit",
              "out_for_delivery",
              "delivered",
              "failed",
              "returned",
              "cancelled"
            ],
            "default": "in_transit"
          },
          "carrier": {
            "type": "string"
          },
          "tracking_number": {
            "type": "string"
          },
          "tracking_url": {
            "type": "string",
            "format": "uri"
          },
          "external_id": {
            "type": "string",
            "description": "ID de la guía u orden en tu sistema.",
            "x-en": "ID of the tracking or order in your system.",
            "x-pt": "ID do rastreio ou da ordem no seu sistema."
          },
          "notes": {
            "type": "string"
          }
        },
        "examples": [
          {
            "status": "in_transit",
            "carrier": "Servientrega",
            "tracking_number": "SV123456",
            "tracking_url": "https://rastreo.ejemplo.com/SV123456"
          }
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "examples": [
              1023
            ]
          },
          "number": {
            "type": "string",
            "examples": [
              "#1023"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "contacted",
              "confirmed",
              "shipped",
              "delivered",
              "cancelled",
              "returned"
            ]
          },
          "financial_status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "failed",
              "refunded"
            ]
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              null,
              "pending",
              "in_transit",
              "out_for_delivery",
              "delivered",
              "failed",
              "returned",
              "cancelled"
            ]
          },
          "payment_method": {
            "type": "string",
            "examples": [
              "delivery"
            ],
            "description": "delivery = contra entrega, cash = pago en sitio, transfer, paypal, yappy, visa, oxxo, local.",
            "x-en": "delivery = cash on delivery, cash = pay in person, transfer, paypal, yappy, visa, oxxo, local.",
            "x-pt": "delivery = pagamento na entrega, cash = pagamento no local, transfer, paypal, yappy, visa, oxxo, local."
          },
          "cash_on_delivery": {
            "type": "boolean",
            "description": "true si se cobra al entregar.",
            "x-en": "true if it is collected on delivery.",
            "x-pt": "true se for cobrado na entrega."
          },
          "currency": {
            "type": "string",
            "examples": [
              "USD"
            ]
          },
          "subtotal": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          },
          "discount": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          },
          "total": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "shipping_address": {
            "$ref": "#/components/schemas/ShippingAddress"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            }
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Todo lo que llenó el comprador, con su etiqueta real.",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "value": {
                  "type": "string"
                }
              }
            },
            "x-en": "Everything the buyer filled in, with its real label.",
            "x-pt": "Tudo o que o comprador preencheu, com o rótulo real."
          },
          "source": {
            "type": "object",
            "properties": {
              "form_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "app_id": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tu ID para este pedido (lo guardás con PATCH).",
            "x-en": "Your ID for this order (you save it with PATCH).",
            "x-pt": "Seu ID para este pedido (você o salva com PATCH)."
          },
          "test": {
            "type": "boolean"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "fulfillments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Fulfillment"
            }
          }
        }
      },
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "country_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "province": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "orders_count": {
            "type": "integer"
          },
          "total_spent": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$",
            "examples": [
              "29.90"
            ]
          },
          "status": {
            "type": "string"
          },
          "last_order_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          }
        }
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "order.created",
                "order.updated",
                "order.cancelled",
                "fulfillment.created",
                "fulfillment.updated",
                "product.created",
                "product.updated",
                "product.deleted"
              ]
            }
          },
          "active": {
            "type": "boolean"
          },
          "failures_in_a_row": {
            "type": "integer"
          },
          "last_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_delivery_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "secret": {
            "type": "string",
            "description": "Solo al crear. Firma cada aviso.",
            "examples": [
              "whsec_…"
            ],
            "x-en": "Only on creation. Signs every notification.",
            "x-pt": "Só na criação. Assina cada aviso."
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "evt_01JB2Q8X3K0R5V7M9N1P3S5T7W"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "order.created",
              "order.updated",
              "order.cancelled",
              "fulfillment.created",
              "fulfillment.updated",
              "product.created",
              "product.updated",
              "product.deleted"
            ]
          },
          "api_version": {
            "type": "string",
            "examples": [
              "2026-10"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "description": "Order, Fulfillment o Product, igual que en la API.",
                "x-en": "Order, Fulfillment or Product, same as in the API.",
                "x-pt": "Order, Fulfillment ou Product, igual à API."
              }
            }
          }
        }
      },
      "Token": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "app": {
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "examples": [
              "2026-10-25T09:30:00-05:00"
            ]
          }
        }
      }
    }
  },
  "x-scopes": {
    "read_store": {
      "es": "Ver los datos de tus tiendas",
      "en": "Read store data"
    },
    "read_products": {
      "es": "Ver productos",
      "en": "Read products"
    },
    "write_products": {
      "es": "Crear, editar y borrar productos",
      "en": "Create, update and delete products"
    },
    "read_inventory": {
      "es": "Ver stock",
      "en": "Read stock"
    },
    "write_inventory": {
      "es": "Actualizar stock",
      "en": "Update stock"
    },
    "read_orders": {
      "es": "Ver pedidos",
      "en": "Read orders"
    },
    "write_orders": {
      "es": "Cambiar estado de pedidos",
      "en": "Update orders"
    },
    "write_fulfillments": {
      "es": "Cargar guías y estados de envío",
      "en": "Create and update fulfillments"
    },
    "read_customers": {
      "es": "Ver clientes",
      "en": "Read customers"
    }
  },
  "x-events": {
    "order.created": {
      "es": "Entró un pedido nuevo",
      "en": "A new order was placed"
    },
    "order.updated": {
      "es": "Cambió el estado, el pago o el envío de un pedido",
      "en": "Order status, payment or shipping changed"
    },
    "order.cancelled": {
      "es": "Se canceló un pedido",
      "en": "An order was cancelled"
    },
    "fulfillment.created": {
      "es": "Se cargó una guía",
      "en": "A fulfillment was created"
    },
    "fulfillment.updated": {
      "es": "Cambió el estado de un envío",
      "en": "A fulfillment status changed"
    },
    "product.created": {
      "es": "Se creó un producto",
      "en": "A product was created"
    },
    "product.updated": {
      "es": "Se editó un producto o su stock",
      "en": "A product or its stock changed"
    },
    "product.deleted": {
      "es": "Se borró un producto",
      "en": "A product was deleted"
    }
  }
}