{
  "openapi": "3.1.0",
  "info": {
    "title": "La Pyme API",
    "description": "Resources and workflows for purchases, sales, inventory, contacts, products, reports, and settings.",
    "version": "1.0.0",
    "contact": {
      "name": "La Pyme Support",
      "email": "hola@lapyme.com.ar"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://lapyme.com.ar/terminos"
    }
  },
  "servers": [
    {
      "url": "https://api.lapyme.com.ar",
      "description": "Servidor de producción"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "API",
      "description": "Public API operations for La Pyme integrations."
    }
  ],
  "x-speakeasy-retries": {
    "strategy": "backoff",
    "backoff": {
      "initialInterval": 500,
      "maxInterval": 60000,
      "maxElapsedTime": 3600000,
      "exponent": 1.5
    },
    "statusCodes": [
      "5XX"
    ],
    "retryConnectionErrors": true
  },
  "components": {
    "schemas": {
      "ApiErrorDetail": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ApiErrorEnvelope": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "api_error",
                  "authentication_error",
                  "authorization_error",
                  "business_error",
                  "external_dependency_error",
                  "idempotency_error",
                  "invalid_request_error",
                  "rate_limit_error"
                ]
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "code",
              "message",
              "retryable",
              "details"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "error"
        ],
        "additionalProperties": false
      },
      "ApiListMetadata": {
        "type": "object",
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ApiOrganization": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "organization"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "person_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "province_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "type": "string"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rounding_preference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_currency": {
            "type": "string",
            "const": "PES"
          },
          "timezone": {
            "type": "string",
            "const": "UTC-3"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "slug",
          "legal_name",
          "logo_url",
          "tax_id",
          "tax_id_type",
          "tax_category",
          "person_type",
          "address",
          "apartment",
          "city",
          "province_id",
          "postal_code",
          "country",
          "phone",
          "email",
          "rounding_preference",
          "default_currency",
          "timezone",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiOrganizationResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "organization"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "legal_name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "logo_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tax_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tax_id_type": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tax_category": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "person_type": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "address": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "apartment": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "city": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "province_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "postal_code": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "country": {
                "type": "string"
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rounding_preference": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_currency": {
                "type": "string",
                "const": "PES"
              },
              "timezone": {
                "type": "string",
                "const": "UTC-3"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "object",
              "id",
              "name",
              "slug",
              "legal_name",
              "logo_url",
              "tax_id",
              "tax_id_type",
              "tax_category",
              "person_type",
              "address",
              "apartment",
              "city",
              "province_id",
              "postal_code",
              "country",
              "phone",
              "email",
              "rounding_preference",
              "default_currency",
              "timezone",
              "created_at",
              "updated_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiTaxRateReference": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "tax_rate_reference"
          },
          "code": {
            "type": "integer"
          },
          "percentage": {
            "type": "number"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "code",
          "percentage",
          "description"
        ],
        "additionalProperties": false
      },
      "ApiTaxRateReferenceListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "tax_rate_reference"
                },
                "code": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "object",
                "code",
                "percentage",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiVoucherTypeReference": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "voucher_type_reference"
          },
          "code": {
            "type": "integer"
          },
          "abbreviation": {
            "type": "string"
          },
          "document_kind": {
            "$ref": "#/components/schemas/ApiSharedEnumd52c0ebb9c"
          },
          "letter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum10987946fd"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "code",
          "abbreviation",
          "document_kind",
          "letter",
          "description"
        ],
        "additionalProperties": false
      },
      "ApiVoucherTypeReferenceListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "voucher_type_reference"
                },
                "code": {
                  "type": "integer"
                },
                "abbreviation": {
                  "type": "string"
                },
                "document_kind": {
                  "$ref": "#/components/schemas/ApiSharedEnumd52c0ebb9c"
                },
                "letter": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedEnum10987946fd"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "object",
                "code",
                "abbreviation",
                "document_kind",
                "letter",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiSupplier": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "supplier"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "company_name",
          "description",
          "email",
          "phone",
          "tax_id",
          "tax_id_type",
          "tax_category",
          "payment_term_id",
          "payment_term_days",
          "is_active",
          "tags"
        ],
        "additionalProperties": false
      },
      "ApiSupplierDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "supplier"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "province_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "company_name",
          "description",
          "email",
          "phone",
          "tax_id",
          "tax_id_type",
          "tax_category",
          "payment_term_id",
          "payment_term_days",
          "is_active",
          "tags",
          "country",
          "province_id",
          "city",
          "address",
          "apartment",
          "postal_code",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSupplierMutationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum250b15b651"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "$ref": "#/components/schemas/ApiSharedEnumbb2864ecea"
          },
          "country": {
            "type": "string"
          },
          "province": {
            "type": "string"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSupplierUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum250b15b651"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "$ref": "#/components/schemas/ApiSharedEnumbb2864ecea"
          },
          "country": {
            "type": "string"
          },
          "province": {
            "type": "string"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ApiSupplierCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "supplier": {
                "$ref": "#/components/schemas/ApiSharedObject3028e7f4b3"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "supplier",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiSupplierUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "supplier": {
                "$ref": "#/components/schemas/ApiSharedObject3028e7f4b3"
              }
            },
            "required": [
              "supplier"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiCategory": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "category"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_economic_activity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "parent_id",
          "default_economic_activity",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiCategoryMutationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_economic_activity": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ApiCategoryCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "category": {
                "$ref": "#/components/schemas/ApiSharedObjectd8582ce697"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "category",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiCategoryUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "category": {
                "$ref": "#/components/schemas/ApiSharedObjectd8582ce697"
              }
            },
            "required": [
              "category"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiWarehouse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "warehouse"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_default": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "points_of_sale_count": {
            "type": "integer",
            "minimum": 0
          },
          "member_count": {
            "type": "integer",
            "minimum": 0
          },
          "register_count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "address",
          "is_default",
          "is_active",
          "points_of_sale_count",
          "member_count",
          "register_count"
        ],
        "additionalProperties": false
      },
      "ApiWarehouseDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "warehouse"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_default": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "address",
          "is_default",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ApiWarehouseMutationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_default": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ApiWarehouseUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_default": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ApiWarehouseCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "warehouse": {
                "$ref": "#/components/schemas/ApiSharedObjectadcf6da6ce"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "warehouse",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiWarehouseUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "warehouse": {
                "$ref": "#/components/schemas/ApiSharedObjectadcf6da6ce"
              }
            },
            "required": [
              "warehouse"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseIssue": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseNormalizedLine": {
        "type": "object",
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "unit_cost": {
            "type": "integer",
            "minimum": 0
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "is_exempt": {
            "type": "boolean"
          },
          "discount_percentage": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "purchase_order_item_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum822a963f55"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center1_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center1_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "product_id",
          "product_name",
          "sku",
          "name",
          "quantity",
          "unit_cost",
          "subtotal",
          "total",
          "tax_rate_id",
          "is_exempt",
          "discount_percentage",
          "purchase_order_item_id",
          "vat_category",
          "account_id",
          "account_name",
          "cost_center1_id",
          "cost_center1_name",
          "cost_center2_id",
          "cost_center2_name",
          "cost_center3_id",
          "cost_center3_name"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseNormalizedSnapshot": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "voucher_type": {
            "type": "integer",
            "minimum": 1
          },
          "supplier_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Numero de comprobante del proveedor. Hasta 120 caracteres."
          },
          "invoice_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha del comprobante en formato YYYY-MM-DD."
          },
          "account_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha contable de la compra en formato YYYY-MM-DD."
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha de vencimiento en formato YYYY-MM-DD."
          },
          "payment_term_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumd34af90520"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "import_document_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum9e7af09974"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rol del comprobante dentro del flujo de importacion."
          },
          "import_source_purchase_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "ID de la factura comercial asociada al despacho aduanero."
          },
          "import_nationalization_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumf0d69c3d87"
              },
              {
                "type": "null"
              }
            ],
            "description": "Estado de nacionalizacion de la factura comercial de importacion."
          },
          "customs_dispatch_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Numero de despacho aduanero informado por el proveedor. Hasta 32 caracteres."
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "products_received": {
            "type": "boolean"
          },
          "products_returned": {
            "type": "boolean"
          },
          "inventory_effect": {
            "$ref": "#/components/schemas/ApiSharedEnumde48b709b2"
          },
          "update_product_variant_cost": {
            "type": "boolean"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "discount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "exempt_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "non_taxed_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "base_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_perception_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "national_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_income_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "municipal_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "internal_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "other_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pdf_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "manual_account_allocations": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectbf19ed87b4"
            }
          }
        },
        "required": [
          "supplier_id",
          "voucher_type",
          "supplier_invoice_number",
          "invoice_date",
          "account_date",
          "due_date",
          "payment_term_id",
          "payment_term_days",
          "import_document_role",
          "import_source_purchase_id",
          "import_nationalization_status",
          "customs_dispatch_number",
          "warehouse_id",
          "products_received",
          "products_returned",
          "inventory_effect",
          "update_product_variant_cost",
          "currency",
          "exchange_rate",
          "subtotal",
          "tax_amount",
          "total",
          "discount",
          "exempt_amount",
          "non_taxed_amount",
          "base_amount",
          "vat_perception_amount",
          "national_tax_amount",
          "gross_income_tax_amount",
          "municipal_tax_amount",
          "internal_tax_amount",
          "other_tax_amount",
          "notes",
          "pdf_path",
          "manual_account_allocations",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseProjectedEffects": {
        "type": "object",
        "properties": {
          "inventory": {
            "$ref": "#/components/schemas/ApiSharedObjectb451a3d8de"
          },
          "accounting": {
            "$ref": "#/components/schemas/ApiSharedObject3c43192c61"
          }
        },
        "required": [
          "inventory",
          "accounting"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseCommitResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "purchase_id": {
                "type": "string",
                "format": "uuid"
              },
              "receipt_created": {
                "type": "boolean"
              },
              "idempotent_replay": {
                "type": "boolean"
              },
              "normalized_purchase": {
                "type": "object",
                "properties": {
                  "supplier_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "voucher_type": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "supplier_invoice_number": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Numero de comprobante del proveedor. Hasta 120 caracteres."
                  },
                  "invoice_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Fecha del comprobante en formato YYYY-MM-DD."
                  },
                  "account_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Fecha contable de la compra en formato YYYY-MM-DD."
                  },
                  "due_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Fecha de vencimiento en formato YYYY-MM-DD."
                  },
                  "payment_term_id": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ApiSharedEnumd34af90520"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "payment_term_days": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 365,
                        "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "import_document_role": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ApiSharedEnum9e7af09974"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Rol del comprobante dentro del flujo de importacion."
                  },
                  "import_source_purchase_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "ID de la factura comercial asociada al despacho aduanero."
                  },
                  "import_nationalization_status": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ApiSharedEnumf0d69c3d87"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Estado de nacionalizacion de la factura comercial de importacion."
                  },
                  "customs_dispatch_number": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Numero de despacho aduanero informado por el proveedor. Hasta 32 caracteres."
                  },
                  "warehouse_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "products_received": {
                    "type": "boolean"
                  },
                  "products_returned": {
                    "type": "boolean"
                  },
                  "inventory_effect": {
                    "$ref": "#/components/schemas/ApiSharedEnumde48b709b2"
                  },
                  "update_product_variant_cost": {
                    "type": "boolean"
                  },
                  "currency": {
                    "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                  },
                  "exchange_rate": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "subtotal": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tax_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "total": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exempt_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "non_taxed_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "base_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vat_perception_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "national_tax_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "gross_income_tax_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "municipal_tax_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "internal_tax_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "other_tax_amount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notes": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pdf_path": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "manual_account_allocations": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ApiSharedObjectbf19ed87b4"
                    }
                  }
                },
                "required": [
                  "supplier_id",
                  "voucher_type",
                  "supplier_invoice_number",
                  "invoice_date",
                  "account_date",
                  "due_date",
                  "payment_term_id",
                  "payment_term_days",
                  "import_document_role",
                  "import_source_purchase_id",
                  "import_nationalization_status",
                  "customs_dispatch_number",
                  "warehouse_id",
                  "products_received",
                  "products_returned",
                  "inventory_effect",
                  "update_product_variant_cost",
                  "currency",
                  "exchange_rate",
                  "subtotal",
                  "tax_amount",
                  "total",
                  "discount",
                  "exempt_amount",
                  "non_taxed_amount",
                  "base_amount",
                  "vat_perception_amount",
                  "national_tax_amount",
                  "gross_income_tax_amount",
                  "municipal_tax_amount",
                  "internal_tax_amount",
                  "other_tax_amount",
                  "notes",
                  "pdf_path",
                  "manual_account_allocations",
                  "items"
                ],
                "additionalProperties": false
              },
              "projected_effects": {
                "type": "object",
                "properties": {
                  "inventory": {
                    "$ref": "#/components/schemas/ApiSharedObjectb451a3d8de"
                  },
                  "accounting": {
                    "$ref": "#/components/schemas/ApiSharedObject3c43192c61"
                  }
                },
                "required": [
                  "inventory",
                  "accounting"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "purchase_id",
              "receipt_created",
              "idempotent_replay",
              "normalized_purchase",
              "projected_effects"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectc671832641"
            }
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseTransactionRequest": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "voucher_type": {
            "type": "integer",
            "minimum": 1
          },
          "import_document_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum9e7af09974"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rol del comprobante dentro del flujo de importacion."
          },
          "import_source_purchase_id": {
            "description": "ID de la factura comercial asociada al despacho aduanero.",
            "type": "string",
            "format": "uuid"
          },
          "import_nationalization_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumf0d69c3d87"
              },
              {
                "type": "null"
              }
            ],
            "description": "Estado de nacionalizacion de la factura comercial de importacion."
          },
          "customs_dispatch_number": {
            "description": "Numero de despacho aduanero informado por el proveedor. Hasta 32 caracteres.",
            "type": "string"
          },
          "supplier_invoice_number": {
            "description": "Numero de comprobante del proveedor. Hasta 120 caracteres.",
            "type": "string"
          },
          "invoice_date": {
            "description": "Fecha del comprobante en formato YYYY-MM-DD.",
            "type": "string",
            "format": "date"
          },
          "account_date": {
            "description": "Fecha contable de la compra en formato YYYY-MM-DD.",
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "description": "Fecha de vencimiento en formato YYYY-MM-DD.",
            "type": "string",
            "format": "date"
          },
          "payment_term_id": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApiSharedEnumd34af90520"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "national_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_tax_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject95929ea589"
            }
          },
          "municipal_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "internal_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "other_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "products_received": {
            "type": "boolean"
          },
          "products_returned": {
            "description": "If true, a supplier credit note returns product quantities from the selected warehouse. Requires warehouseId. Invalid on non-credit purchases.",
            "type": "boolean"
          },
          "update_product_variant_cost": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjecta0d0e49f42"
            }
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "discount": {
            "type": "integer",
            "minimum": 0
          },
          "exempt_amount": {
            "type": "integer",
            "minimum": 0
          },
          "non_taxed_amount": {
            "type": "integer",
            "minimum": 0
          },
          "base_amount": {
            "type": "integer",
            "minimum": 0
          },
          "vat_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectfb7405a472"
            }
          },
          "manual_account_allocations": {
            "$ref": "#/components/schemas/ApiSharedObjectbea003a73d"
          },
          "notes": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "pdf_path": {
            "type": "string"
          },
          "vat_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum822a963f55"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "confirmed"
            ]
          }
        },
        "required": [
          "voucher_type",
          "currency"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseUpdateRequest": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "voucher_type": {
            "type": "integer",
            "minimum": 1
          },
          "import_document_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum9e7af09974"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rol del comprobante dentro del flujo de importacion."
          },
          "import_source_purchase_id": {
            "description": "ID de la factura comercial asociada al despacho aduanero.",
            "type": "string",
            "format": "uuid"
          },
          "import_nationalization_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumf0d69c3d87"
              },
              {
                "type": "null"
              }
            ],
            "description": "Estado de nacionalizacion de la factura comercial de importacion."
          },
          "customs_dispatch_number": {
            "description": "Numero de despacho aduanero informado por el proveedor. Hasta 32 caracteres.",
            "type": "string"
          },
          "supplier_invoice_number": {
            "description": "Numero de comprobante del proveedor. Hasta 120 caracteres.",
            "type": "string"
          },
          "invoice_date": {
            "description": "Fecha del comprobante en formato YYYY-MM-DD.",
            "type": "string",
            "format": "date"
          },
          "account_date": {
            "description": "Fecha contable de la compra en formato YYYY-MM-DD.",
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "description": "Fecha de vencimiento en formato YYYY-MM-DD.",
            "type": "string",
            "format": "date"
          },
          "payment_term_id": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApiSharedEnumd34af90520"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "national_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_tax_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject95929ea589"
            }
          },
          "municipal_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "internal_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "other_tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "products_received": {
            "type": "boolean"
          },
          "products_returned": {
            "description": "If true, a supplier credit note returns product quantities from the selected warehouse. Requires warehouseId. Invalid on non-credit purchases.",
            "type": "boolean"
          },
          "update_product_variant_cost": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjecta0d0e49f42"
            }
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "discount": {
            "type": "integer",
            "minimum": 0
          },
          "exempt_amount": {
            "type": "integer",
            "minimum": 0
          },
          "non_taxed_amount": {
            "type": "integer",
            "minimum": 0
          },
          "base_amount": {
            "type": "integer",
            "minimum": 0
          },
          "vat_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectfb7405a472"
            }
          },
          "manual_account_allocations": {
            "$ref": "#/components/schemas/ApiSharedObjectbea003a73d"
          },
          "notes": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "pdf_path": {
            "type": "string"
          },
          "vat_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum822a963f55"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "voucher_type",
          "items",
          "currency"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseTransactionSuccessResponse": {
        "$ref": "#/components/schemas/ApiPurchaseCommitResponse"
      },
      "ApiSaleIssue": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ApiSaleNormalizedPayment": {
        "type": "object",
        "properties": {
          "method_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "terminal_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_batch_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_coupon_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_installment_plan_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cash_source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectf61e74f9c5"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "method_id",
          "amount",
          "description",
          "reference",
          "fee_amount",
          "terminal_id",
          "card_batch_number",
          "card_coupon_number",
          "card_installment_plan_code",
          "card_brand",
          "cash_source"
        ],
        "additionalProperties": false
      },
      "ApiSaleNormalizedLine": {
        "type": "object",
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumff49232140"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "unit_price": {
            "type": "integer",
            "minimum": 0
          },
          "unit_cost": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "is_exempt": {
            "type": "boolean"
          },
          "discount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject16c3799d74"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "line_type": {
            "$ref": "#/components/schemas/ApiSharedEnum4e55733f20"
          },
          "cost_center1_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "product_id",
          "product_name",
          "sku",
          "warehouse_id",
          "name",
          "product_type",
          "quantity",
          "unit_price",
          "unit_cost",
          "tax_rate_id",
          "is_exempt",
          "discount",
          "notes",
          "account_id",
          "line_type",
          "cost_center1_id",
          "cost_center2_id",
          "cost_center3_id"
        ],
        "additionalProperties": false
      },
      "ApiSaleNormalizedSnapshot": {
        "type": "object",
        "properties": {
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer_tax_category_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "voucher_type": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 95
              },
              {
                "type": "number",
                "const": 201
              },
              {
                "type": "number",
                "const": 206
              },
              {
                "type": "number",
                "const": 211
              }
            ]
          },
          "point_of_sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "register_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "operator_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "service_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "same_currency_payment": {
            "type": "boolean"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "exempt_amount": {
            "type": "integer",
            "minimum": 0
          },
          "non_taxed_amount": {
            "type": "integer",
            "minimum": 0
          },
          "tributes_amount": {
            "type": "integer",
            "minimum": 0
          },
          "national_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_tax_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject95929ea589"
            }
          },
          "municipal_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "internal_tribute_amount": {
            "type": "integer",
            "minimum": 0
          },
          "uncategorized_vat_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "other_tribute_amount": {
            "type": "integer",
            "minimum": 0
          },
          "discount_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum539fdceccc"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_value": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_amount": {
            "type": "integer",
            "minimum": 0
          },
          "balance": {
            "type": "number"
          },
          "is_full_amount_pending": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject55e2bcf4a7"
            }
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjecte4ddc41067"
            }
          }
        },
        "required": [
          "customer_id",
          "customer_tax_category_override",
          "voucher_type",
          "point_of_sale_id",
          "register_id",
          "operator_id",
          "invoice_date",
          "due_date",
          "service_from",
          "service_to",
          "currency",
          "exchange_rate",
          "same_currency_payment",
          "notes",
          "subtotal",
          "tax_amount",
          "total",
          "exempt_amount",
          "non_taxed_amount",
          "tributes_amount",
          "national_perception_amount",
          "gross_income_perception_amount",
          "gross_income_tax_breakdown",
          "municipal_perception_amount",
          "internal_tribute_amount",
          "uncategorized_vat_perception_amount",
          "other_tribute_amount",
          "discount_type",
          "discount_value",
          "discount_amount",
          "balance",
          "is_full_amount_pending",
          "items",
          "payment_methods"
        ],
        "additionalProperties": false
      },
      "ApiSaleProjectedEffects": {
        "type": "object",
        "properties": {
          "inventory": {
            "$ref": "#/components/schemas/ApiSharedObject6a71e7888b"
          },
          "accounting": {
            "$ref": "#/components/schemas/ApiSharedObject9428e7100c"
          },
          "fiscal": {
            "$ref": "#/components/schemas/ApiSharedObject3563932f8e"
          },
          "payments": {
            "$ref": "#/components/schemas/ApiSharedObject8e516a9b19"
          }
        },
        "required": [
          "inventory",
          "accounting",
          "fiscal",
          "payments"
        ],
        "additionalProperties": false
      },
      "ApiSalePersistedSnapshot": {
        "type": "object",
        "properties": {
          "sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "voucher_type": {
            "type": "string"
          },
          "point_of_sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_status": {
            "$ref": "#/components/schemas/ApiSharedEnum9ac70a3316"
          },
          "invoice_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string"
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "exempt_amount": {
            "type": "integer",
            "minimum": 0
          },
          "non_taxed_amount": {
            "type": "integer",
            "minimum": 0
          },
          "tributes_amount": {
            "type": "integer",
            "minimum": 0
          },
          "discount_amount": {
            "type": "integer"
          },
          "balance": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "sale_id",
          "customer_id",
          "voucher_type",
          "point_of_sale_id",
          "invoice_number",
          "formatted_invoice_number",
          "invoice_status",
          "invoice_date",
          "due_date",
          "currency",
          "subtotal",
          "tax_amount",
          "total",
          "exempt_amount",
          "non_taxed_amount",
          "tributes_amount",
          "discount_amount",
          "balance",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ApiSaleCommitResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "sale": {
                "type": "object",
                "properties": {
                  "sale_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "customer_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "voucher_type": {
                    "type": "string"
                  },
                  "point_of_sale_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "invoice_number": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "formatted_invoice_number": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "invoice_status": {
                    "$ref": "#/components/schemas/ApiSharedEnum9ac70a3316"
                  },
                  "invoice_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "subtotal": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "tax_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "exempt_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "non_taxed_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "tributes_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "discount_amount": {
                    "type": "integer"
                  },
                  "balance": {
                    "type": "number"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "sale_id",
                  "customer_id",
                  "voucher_type",
                  "point_of_sale_id",
                  "invoice_number",
                  "formatted_invoice_number",
                  "invoice_status",
                  "invoice_date",
                  "due_date",
                  "currency",
                  "subtotal",
                  "tax_amount",
                  "total",
                  "exempt_amount",
                  "non_taxed_amount",
                  "tributes_amount",
                  "discount_amount",
                  "balance",
                  "created_at"
                ],
                "additionalProperties": false
              },
              "normalized_sale": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "customer_tax_category_override": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "voucher_type": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 95
                      },
                      {
                        "type": "number",
                        "const": 201
                      },
                      {
                        "type": "number",
                        "const": 206
                      },
                      {
                        "type": "number",
                        "const": 211
                      }
                    ]
                  },
                  "point_of_sale_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "register_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "operator_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "invoice_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "service_from": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "service_to": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                  },
                  "exchange_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "same_currency_payment": {
                    "type": "boolean"
                  },
                  "notes": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subtotal": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "tax_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "exempt_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "non_taxed_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "tributes_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "national_perception_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "gross_income_perception_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "gross_income_tax_breakdown": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ApiSharedObject95929ea589"
                    }
                  },
                  "municipal_perception_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "internal_tribute_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "uncategorized_vat_perception_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "other_tribute_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "discount_type": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ApiSharedEnum539fdceccc"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discount_value": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discount_amount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "balance": {
                    "type": "number"
                  },
                  "is_full_amount_pending": {
                    "type": "boolean"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ApiSharedObject55e2bcf4a7"
                    }
                  },
                  "payment_methods": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ApiSharedObjecte4ddc41067"
                    }
                  }
                },
                "required": [
                  "customer_id",
                  "customer_tax_category_override",
                  "voucher_type",
                  "point_of_sale_id",
                  "register_id",
                  "operator_id",
                  "invoice_date",
                  "due_date",
                  "service_from",
                  "service_to",
                  "currency",
                  "exchange_rate",
                  "same_currency_payment",
                  "notes",
                  "subtotal",
                  "tax_amount",
                  "total",
                  "exempt_amount",
                  "non_taxed_amount",
                  "tributes_amount",
                  "national_perception_amount",
                  "gross_income_perception_amount",
                  "gross_income_tax_breakdown",
                  "municipal_perception_amount",
                  "internal_tribute_amount",
                  "uncategorized_vat_perception_amount",
                  "other_tribute_amount",
                  "discount_type",
                  "discount_value",
                  "discount_amount",
                  "balance",
                  "is_full_amount_pending",
                  "items",
                  "payment_methods"
                ],
                "additionalProperties": false
              },
              "projected_effects": {
                "type": "object",
                "properties": {
                  "inventory": {
                    "$ref": "#/components/schemas/ApiSharedObject6a71e7888b"
                  },
                  "accounting": {
                    "$ref": "#/components/schemas/ApiSharedObject9428e7100c"
                  },
                  "fiscal": {
                    "$ref": "#/components/schemas/ApiSharedObject3563932f8e"
                  },
                  "payments": {
                    "$ref": "#/components/schemas/ApiSharedObject8e516a9b19"
                  }
                },
                "required": [
                  "inventory",
                  "accounting",
                  "fiscal",
                  "payments"
                ],
                "additionalProperties": false
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "sale",
              "normalized_sale",
              "projected_effects",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectc671832641"
            }
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiSaleTransactionRequest": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_tax_category_override": {
            "type": "string"
          },
          "voucher_type": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 95
              },
              {
                "type": "number",
                "const": 201
              },
              {
                "type": "number",
                "const": 206
              },
              {
                "type": "number",
                "const": 211
              }
            ]
          },
          "point_of_sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "register_id": {
            "type": "string",
            "format": "uuid"
          },
          "operator_id": {
            "type": "string",
            "format": "uuid"
          },
          "integration_source": {
            "description": "Fuente de integracion externa para buscar/conciliar la venta. Debe enviarse junto con integrationId.",
            "type": "string"
          },
          "integration_id": {
            "description": "ID de referencia externa visible en la venta. Debe enviarse junto con integrationSource; no se deriva del header Idempotency-Key.",
            "type": "string"
          },
          "invoice_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "service_from": {
            "type": "string",
            "format": "date"
          },
          "service_to": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "same_currency_payment": {
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          },
          "items": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "warehouse_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "unit_cost": {
                  "type": "integer",
                  "minimum": 0
                },
                "name": {
                  "type": "string"
                },
                "product_type": {
                  "type": "string",
                  "enum": [
                    "product",
                    "service"
                  ]
                },
                "tax_rate_id": {
                  "type": "integer",
                  "minimum": 0
                },
                "is_exempt": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "unit_price": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Importe unitario en centavos. Para comprobantes A (1, 2 y 3), enviá el importe neto sin IVA. Para comprobantes a consumidor final, incluidos B (6, 7 y 8) y presupuesto (90), enviá el importe final con IVA incluido."
                },
                "discount": {
                  "$ref": "#/components/schemas/ApiSharedObject16c3799d74"
                },
                "notes": {
                  "type": "string"
                },
                "account_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "line_type": {
                  "$ref": "#/components/schemas/ApiSharedEnum4e55733f20"
                },
                "cost_center1_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "cost_center2_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "cost_center3_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "quantity",
                "unit_price"
              ],
              "additionalProperties": false
            }
          },
          "discount_type": {
            "$ref": "#/components/schemas/ApiSharedEnum539fdceccc"
          },
          "discount_value": {
            "type": "number",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total final esperado en centavos. La API lo compara con el total canónico antes de crear la venta o cualquier efecto durable."
          },
          "national_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "gross_income_tax_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject95929ea589"
            }
          },
          "municipal_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "internal_tribute_amount": {
            "type": "integer",
            "minimum": 0
          },
          "uncategorized_vat_perception_amount": {
            "type": "integer",
            "minimum": 0
          },
          "other_tribute_amount": {
            "type": "integer",
            "minimum": 0
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "method_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "amount": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "description": {
                  "type": "string"
                },
                "reference": {
                  "type": "string"
                },
                "fee_amount": {
                  "type": "integer",
                  "minimum": 0
                },
                "terminal_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "card_batch_number": {
                  "type": "string"
                },
                "card_coupon_number": {
                  "type": "string"
                },
                "card_installment_plan_code": {
                  "type": "string"
                },
                "card_brand": {
                  "type": "string"
                },
                "register_id": {
                  "description": "ID de caja para pagos en efectivo. Usá cashSource en integraciones nuevas.",
                  "type": "string",
                  "format": "uuid"
                },
                "safe_id": {
                  "description": "ID de caja fuerte para pagos en efectivo. Usá cashSource en integraciones nuevas.",
                  "type": "string",
                  "format": "uuid"
                },
                "cash_source": {
                  "description": "Origen de efectivo para pagos cash. No combinar con registerId o safeId.",
                  "type": "object",
                  "properties": {
                    "type": {
                      "$ref": "#/components/schemas/ApiSharedEnum459535dab3"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID de la caja o caja fuerte."
                    }
                  },
                  "required": [
                    "type",
                    "id"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "method_id",
                "amount"
              ],
              "additionalProperties": false
            }
          },
          "is_full_amount_pending": {
            "type": "boolean"
          }
        },
        "required": [
          "voucher_type",
          "point_of_sale_id",
          "invoice_date",
          "currency",
          "items",
          "total"
        ],
        "additionalProperties": false
      },
      "ApiSaleTransactionSuccessResponse": {
        "$ref": "#/components/schemas/ApiSaleCommitResponse"
      },
      "ApiAccountingEvidence": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "accounting_evidence"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum8b51d9e8f5"
          },
          "journal_entry_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "journal_entries_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject76de9df039"
            }
          }
        },
        "required": [
          "object",
          "status",
          "journal_entry_ids",
          "journal_entries_url",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiAccount": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "account"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "code",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiJournalEntryLine": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "journal_entry_line"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "account": {
            "$ref": "#/components/schemas/ApiSharedObject6f6a8f3873"
          },
          "debit": {
            "type": "integer"
          },
          "credit": {
            "type": "integer"
          },
          "entered_debit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entered_credit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectede6d90fef"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_centers": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "id",
          "account",
          "debit",
          "credit",
          "entered_debit",
          "entered_credit",
          "currency",
          "contact",
          "cost_centers",
          "description"
        ],
        "additionalProperties": false
      },
      "ApiJournalEntry": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "journal_entry"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "entry_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject5785340ece"
            }
          }
        },
        "required": [
          "object",
          "id",
          "entry_number",
          "date",
          "description",
          "reference",
          "source_type",
          "source_id",
          "currency",
          "exchange_rate",
          "created_at",
          "updated_at",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiJournalEntriesListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "list"
          },
          "url": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "journal_entry"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "entry_number": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "description": {
                  "type": "string"
                },
                "reference": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "type": "string"
                },
                "exchange_rate": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "lines": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedObject5785340ece"
                  }
                }
              },
              "required": [
                "object",
                "id",
                "entry_number",
                "date",
                "description",
                "reference",
                "source_type",
                "source_id",
                "currency",
                "exchange_rate",
                "created_at",
                "updated_at",
                "lines"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "request_id",
          "object",
          "url",
          "data",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ApiAccountLedgerLine": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "account_ledger_line"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "journal_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center1_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "debit": {
            "type": "integer"
          },
          "credit": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "integer"
          }
        },
        "required": [
          "object",
          "id",
          "date",
          "journal_entry_id",
          "account_id",
          "source_type",
          "source_id",
          "description",
          "reference",
          "counterparty_name",
          "contact_id",
          "cost_center1_id",
          "cost_center2_id",
          "cost_center3_id",
          "debit",
          "credit",
          "currency",
          "balance"
        ],
        "additionalProperties": false
      },
      "ApiAccountLedger": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "account_ledger"
          },
          "account": {
            "$ref": "#/components/schemas/ApiSharedObject6f6a8f3873"
          },
          "opening_balance": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject263c44dc2c"
            }
          },
          "closing_balance": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "account",
          "opening_balance",
          "currency",
          "lines",
          "closing_balance",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ApiAccountLedgerResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "account_ledger"
              },
              "account": {
                "$ref": "#/components/schemas/ApiSharedObject6f6a8f3873"
              },
              "opening_balance": {
                "type": "integer"
              },
              "currency": {
                "type": "string"
              },
              "lines": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiSharedObject263c44dc2c"
                }
              },
              "closing_balance": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "object",
              "account",
              "opening_balance",
              "currency",
              "lines",
              "closing_balance",
              "has_more",
              "next_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiAccountingAccount": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "account"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum5433445ffc"
          },
          "normal_balance": {
            "$ref": "#/components/schemas/ApiSharedEnum1d20f1f7e9"
          },
          "system_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum87e38e3147"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "is_postable": {
            "type": "boolean"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "income_statement_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnuma6084829bf"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_inflation_adjustable": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "id",
          "code",
          "name",
          "description",
          "type",
          "normal_balance",
          "system_role",
          "is_active",
          "is_postable",
          "parent_id",
          "income_statement_category",
          "is_inflation_adjustable"
        ],
        "additionalProperties": false
      },
      "ApiAccountingAccountCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum5433445ffc"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_postable": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "income_statement_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnuma6084829bf"
              },
              {
                "type": "null"
              }
            ]
          },
          "system_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum87e38e3147"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_inflation_adjustable": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "type",
          "parent_id",
          "is_postable",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ApiAccountingAccountPatchRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum5433445ffc"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_postable": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "income_statement_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnuma6084829bf"
              },
              {
                "type": "null"
              }
            ]
          },
          "system_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum87e38e3147"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_inflation_adjustable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ApiAccountingAccountWriteResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "account"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "code": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": "string"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "$ref": "#/components/schemas/ApiSharedEnum5433445ffc"
              },
              "normal_balance": {
                "$ref": "#/components/schemas/ApiSharedEnum1d20f1f7e9"
              },
              "system_role": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApiSharedEnum87e38e3147"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "is_postable": {
                "type": "boolean"
              },
              "parent_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "income_statement_category": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApiSharedEnuma6084829bf"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_inflation_adjustable": {
                "type": "boolean"
              }
            },
            "required": [
              "object",
              "id",
              "code",
              "name",
              "description",
              "type",
              "normal_balance",
              "system_role",
              "is_active",
              "is_postable",
              "parent_id",
              "income_statement_category",
              "is_inflation_adjustable"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiCostCenterDimension": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "cost_center_dimension"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3
          },
          "is_active": {
            "type": "boolean"
          },
          "is_required": {
            "type": "boolean"
          },
          "show_in_sales": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "position",
          "is_active",
          "is_required",
          "show_in_sales"
        ],
        "additionalProperties": false
      },
      "ApiCostCenter": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "cost_center"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "dimension_id": {
            "type": "string",
            "format": "uuid"
          },
          "dimension_name": {
            "type": "string"
          },
          "dimension_position": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "id",
          "dimension_id",
          "dimension_name",
          "dimension_position",
          "code",
          "name",
          "parent_id",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ApiManualJournalEntryRequest": {
        "type": "object",
        "properties": {
          "occurred_at": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnumefeae30318"
                },
                "debit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "credit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entered_debit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entered_credit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center1_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center2_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center3_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contact_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "account_id"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "occurred_at",
          "description",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiManualJournalEntryUpdateRequest": {
        "type": "object",
        "properties": {
          "occurred_at": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "unapply_allocated_lines": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "account_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnumefeae30318"
                },
                "debit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "credit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entered_debit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entered_credit": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center1_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center2_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center3_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contact_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "account_id"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "occurred_at",
          "description",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiJournalEntryWriteResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "journal_entry": {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "journal_entry"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "object",
                  "id"
                ],
                "additionalProperties": false
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "journal_entry"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiInflationAdjustmentPreviewRequest": {
        "type": "object",
        "properties": {
          "occurred_at": {
            "type": "string",
            "format": "date"
          },
          "coefficient": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "occurred_at",
          "coefficient"
        ],
        "additionalProperties": false
      },
      "ApiInflationAdjustmentCreateRequest": {
        "type": "object",
        "properties": {
          "occurred_at": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "adjustment_amount": {
                  "type": "integer"
                }
              },
              "required": [
                "account_id",
                "adjustment_amount"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "occurred_at",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiTransferIssue": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ApiTransferSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "transfer_number": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_transfer_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_date": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum736f0d077b"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "updated_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_warehouse": {
            "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
          },
          "target_warehouse": {
            "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject9090c617d7"
            }
          }
        },
        "required": [
          "id",
          "organization_id",
          "source_warehouse_id",
          "target_warehouse_id",
          "transfer_number",
          "formatted_transfer_number",
          "transfer_date",
          "notes",
          "status",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by",
          "source_warehouse",
          "target_warehouse",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiStockTransferRequest": {
        "type": "object",
        "properties": {
          "source_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "transfer_date": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "items": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "required": [
                "product_id",
                "quantity"
              ],
              "additionalProperties": false
            }
          },
          "save_as_draft": {
            "type": "boolean"
          },
          "mark_as_received": {
            "type": "boolean"
          }
        },
        "required": [
          "source_warehouse_id",
          "target_warehouse_id",
          "transfer_date",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiStockTransferSuccessResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "transfer": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source_warehouse_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "target_warehouse_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "transfer_number": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "formatted_transfer_number": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "transfer_date": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "notes": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "$ref": "#/components/schemas/ApiSharedEnum736f0d077b"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": "string"
                  },
                  "updated_by": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source_warehouse": {
                    "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                  },
                  "target_warehouse": {
                    "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ApiSharedObject9090c617d7"
                    }
                  }
                },
                "required": [
                  "id",
                  "organization_id",
                  "source_warehouse_id",
                  "target_warehouse_id",
                  "transfer_number",
                  "formatted_transfer_number",
                  "transfer_date",
                  "notes",
                  "status",
                  "created_at",
                  "updated_at",
                  "created_by",
                  "updated_by",
                  "source_warehouse",
                  "target_warehouse",
                  "items"
                ],
                "additionalProperties": false
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "transfer",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectc671832641"
            }
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiSupplierListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "supplier"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "company_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "email": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phone": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_id_type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_category": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payment_term_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payment_term_days": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 365,
                      "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_active": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedObject8a94344083"
                  }
                }
              },
              "required": [
                "object",
                "id",
                "name",
                "company_name",
                "description",
                "email",
                "phone",
                "tax_id",
                "tax_id_type",
                "tax_category",
                "payment_term_id",
                "payment_term_days",
                "is_active",
                "tags"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiSupplierDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject3028e7f4b3"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiCategoryListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectd8582ce697"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiCategoryDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObjectd8582ce697"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiProductListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "image_url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image."
                },
                "currency": {
                  "type": "string"
                },
                "cost": {
                  "type": "number"
                },
                "price": {
                  "type": "number"
                },
                "tax_rate": {
                  "$ref": "#/components/schemas/ApiSharedObjectee5eae48b0"
                },
                "default_supplier": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "product_type": {
                  "$ref": "#/components/schemas/ApiSharedEnumff49232140"
                },
                "is_active": {
                  "type": "boolean"
                },
                "organization_slug": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "effective_price": {
                  "type": "number"
                },
                "price_source": {
                  "$ref": "#/components/schemas/ApiSharedEnumfe93f70a59"
                },
                "applied_price_list": {
                  "$ref": "#/components/schemas/ApiSharedObjectc1ee297650"
                },
                "object": {
                  "type": "string",
                  "const": "product"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedObject8a94344083"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "category",
                "sku",
                "barcode",
                "image_url",
                "currency",
                "cost",
                "price",
                "tax_rate",
                "default_supplier",
                "product_type",
                "is_active",
                "organization_slug",
                "created_at",
                "updated_at",
                "object",
                "tags"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiProductMutationRequest": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "category_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "visibility": {
                "$ref": "#/components/schemas/ApiSharedEnum6ecba1a4ce"
              },
              "image_url": {
                "description": "External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "product_type": {
                "default": "product",
                "type": "string",
                "enum": [
                  "product",
                  "service",
                  "combo",
                  "kit"
                ]
              },
              "sku": {
                "type": "string"
              },
              "barcode": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "unit_of_measure": {
                "$ref": "#/components/schemas/ApiSharedEnum5f0db377e3"
              },
              "currency": {
                "$ref": "#/components/schemas/ApiSharedEnum70385a22ba"
              },
              "cost": {
                "default": 0,
                "type": "integer",
                "minimum": 0
              },
              "price": {
                "description": "Manual sale price in cents. Mutually exclusive with markup_percentage; send price for manual pricing or markup_percentage for markup pricing.",
                "type": "integer",
                "minimum": 0
              },
              "promotional_price": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "markup_percentage": {
                "description": "Markup percentage used to calculate the sale price from cost, tax, and organization rounding rules. Mutually exclusive with price; send null to switch back to manual pricing.",
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tax_rate_id": {
                "default": 5,
                "type": "integer"
              },
              "is_exempt": {
                "default": false,
                "type": "boolean"
              },
              "default_supplier_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_sales_account_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_purchase_account_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warehouse_stocks": {
                "default": [],
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiSharedObject6dbe49c4ef"
                }
              },
              "is_active": {
                "default": true,
                "type": "boolean"
              },
              "metafields": {
                "description": "Group-level custom field values addressed by canonical key. Available when custom fields are enabled for the organization.",
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiSharedObject0347948139"
                }
              }
            },
            "required": [
              "name",
              "sku"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "category_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "visibility": {
                "$ref": "#/components/schemas/ApiSharedEnum6ecba1a4ce"
              },
              "image_url": {
                "description": "External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_supplier_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_sales_account_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_purchase_account_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_active": {
                "default": true,
                "type": "boolean"
              },
              "metafields": {
                "description": "Group-level custom field values addressed by canonical key. Available when custom fields are enabled for the organization.",
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiSharedObject0347948139"
                }
              },
              "product_type": {
                "default": "product",
                "type": "string",
                "const": "product"
              },
              "options": {
                "minItems": 1,
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Nombres ordenados de las opciones de variantes, por ejemplo Material, Color y Talle."
              },
              "variants": {
                "minItems": 1,
                "maxItems": 250,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "image_url": {
                      "description": "External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image.",
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sku": {
                      "type": "string"
                    },
                    "barcode": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "unit_of_measure": {
                      "$ref": "#/components/schemas/ApiSharedEnum5f0db377e3"
                    },
                    "currency": {
                      "$ref": "#/components/schemas/ApiSharedEnum70385a22ba"
                    },
                    "cost": {
                      "default": 0,
                      "type": "integer",
                      "minimum": 0
                    },
                    "price": {
                      "description": "Manual sale price in cents. Mutually exclusive with markup_percentage; send price for manual pricing or markup_percentage for markup pricing.",
                      "type": "integer",
                      "minimum": 0
                    },
                    "promotional_price": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "markup_percentage": {
                      "description": "Markup percentage used to calculate the sale price from cost, tax, and organization rounding rules. Mutually exclusive with price; send null to switch back to manual pricing.",
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tax_rate_id": {
                      "default": 5,
                      "type": "integer"
                    },
                    "is_exempt": {
                      "default": false,
                      "type": "boolean"
                    },
                    "warehouse_stocks": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiSharedObject6dbe49c4ef"
                      }
                    },
                    "option_values": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Mapa con exactamente un valor por cada nombre declarado en options."
                    }
                  },
                  "required": [
                    "sku",
                    "option_values"
                  ],
                  "additionalProperties": false
                },
                "description": "Variantes vendibles que se crearán dentro del producto."
              }
            },
            "required": [
              "name",
              "options",
              "variants"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ApiProductUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "category_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "both",
              "sales",
              "purchases"
            ]
          },
          "image_url": {
            "description": "External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "$ref": "#/components/schemas/ApiSharedEnumff49232140"
          },
          "sku": {
            "type": "string"
          },
          "barcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit_of_measure": {
            "type": "string",
            "enum": [
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19",
              "20",
              "21",
              "22",
              "23",
              "24",
              "25",
              "26",
              "27",
              "28",
              "29",
              "30",
              "31",
              "32",
              "33",
              "34",
              "35",
              "36",
              "37",
              "41",
              "47",
              "48",
              "49",
              "50",
              "51",
              "52",
              "53",
              "54",
              "55",
              "61",
              "62",
              "63",
              "97",
              "98",
              "99",
              "00",
              "01",
              "02",
              "03",
              "04",
              "05",
              "06",
              "07",
              "08",
              "09"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "cost": {
            "type": "integer",
            "minimum": 0
          },
          "price": {
            "description": "Manual sale price in cents. Mutually exclusive with markup_percentage; send price for manual pricing or markup_percentage for markup pricing.",
            "type": "integer",
            "minimum": 0
          },
          "promotional_price": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "markup_percentage": {
            "description": "Markup percentage used to calculate the sale price from cost, tax, and organization rounding rules. Mutually exclusive with price; send null to switch back to manual pricing.",
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_id": {
            "type": "integer"
          },
          "is_exempt": {
            "type": "boolean"
          },
          "default_supplier_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_sales_account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_purchase_account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_stocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject6dbe49c4ef"
            }
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ApiProductBulkAdjustmentRequest": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "enum": [
              "cost",
              "price"
            ]
          },
          "operation_type": {
            "type": "string",
            "enum": [
              "increase",
              "decrease"
            ]
          },
          "adjustment_type": {
            "type": "string",
            "enum": [
              "percentage",
              "fixed"
            ]
          },
          "adjustment_value": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "search": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "product_type": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedEnumff49232140"
            }
          },
          "default_supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "selection": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "all"
                  },
                  "excluded_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "specific"
                  },
                  "ids": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "type",
                  "ids"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "target",
          "operation_type",
          "adjustment_type",
          "adjustment_value",
          "selection"
        ],
        "additionalProperties": false
      },
      "ApiProductMetafieldPatchRequest": {
        "type": "object",
        "properties": {
          "entries": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "key",
                "value"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "entries"
        ],
        "additionalProperties": false
      },
      "ApiProductMetafieldDefinitionsResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "definitions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "field_type": {
                      "type": "string",
                      "enum": [
                        "boolean",
                        "text",
                        "number",
                        "date",
                        "select"
                      ]
                    },
                    "validations": {
                      "type": "object",
                      "properties": {
                        "required": {
                          "type": "boolean"
                        },
                        "min_length": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "max_length": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "min": {
                          "type": "number"
                        },
                        "max": {
                          "type": "number"
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "required"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "key",
                    "name",
                    "description",
                    "field_type",
                    "validations"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "definitions"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiProductDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "type": "string"
          },
          "barcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image."
          },
          "currency": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "tax_rate": {
            "$ref": "#/components/schemas/ApiSharedObjectee5eae48b0"
          },
          "default_supplier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "$ref": "#/components/schemas/ApiSharedEnumff49232140"
          },
          "is_active": {
            "type": "boolean"
          },
          "organization_slug": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "effective_price": {
            "type": "number"
          },
          "price_source": {
            "$ref": "#/components/schemas/ApiSharedEnumfe93f70a59"
          },
          "applied_price_list": {
            "$ref": "#/components/schemas/ApiSharedObjectc1ee297650"
          },
          "object": {
            "type": "string",
            "const": "product"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "variant_group_id": {
            "type": "string",
            "format": "uuid"
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "is_exempt": {
            "type": "boolean"
          },
          "metafields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject0347948139"
            }
          },
          "stock_summary": {
            "$ref": "#/components/schemas/ApiSharedObjecta9f7340006"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "category",
          "sku",
          "barcode",
          "image_url",
          "currency",
          "cost",
          "price",
          "tax_rate",
          "default_supplier",
          "product_type",
          "is_active",
          "organization_slug",
          "created_at",
          "updated_at",
          "object",
          "tags",
          "variant_group_id",
          "variant_options",
          "is_exempt",
          "metafields",
          "stock_summary"
        ],
        "additionalProperties": false
      },
      "ApiProductDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject2ca3c1ad56"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiProductCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "product": {
                "$ref": "#/components/schemas/ApiSharedObject2ca3c1ad56"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "product",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiProductUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "product": {
                "$ref": "#/components/schemas/ApiSharedObject2ca3c1ad56"
              }
            },
            "required": [
              "product"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiProductBulkAdjustmentResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "product_bulk_adjustment": {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "product_bulk_adjustment"
                  },
                  "updated": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "skipped": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "object",
                  "updated",
                  "skipped"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "product_bulk_adjustment"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiWarehouseListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "warehouse"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "address": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_default": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "points_of_sale_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "member_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "register_count": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "object",
                "id",
                "name",
                "address",
                "is_default",
                "is_active",
                "points_of_sale_count",
                "member_count",
                "register_count"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiWarehouseDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObjectadcf6da6ce"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiPriceList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "is_automatic": {
            "type": "boolean"
          },
          "automatic_pricing_mode": {
            "$ref": "#/components/schemas/ApiSharedEnum3c5633618c"
          },
          "adjustment_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_inclusive": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "const": "price_list"
          }
        },
        "required": [
          "id",
          "name",
          "is_automatic",
          "automatic_pricing_mode",
          "adjustment_percentage",
          "source_price_list_id",
          "tax_inclusive",
          "created_at",
          "object"
        ],
        "additionalProperties": false
      },
      "ApiPriceListMutationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "is_automatic": {
            "default": true,
            "type": "boolean"
          },
          "automatic_pricing_mode": {
            "default": "base_price_adjustment",
            "type": "string",
            "enum": [
              "base_price_adjustment",
              "cost_markup"
            ]
          },
          "adjustment_percentage": {
            "anyOf": [
              {
                "type": "number",
                "minimum": -100,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "source_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_economic_activity": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_inclusive": {
            "default": true,
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ApiPriceListListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject812fa01669"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiPriceListDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject812fa01669"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiPriceListCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "price_list": {
                "$ref": "#/components/schemas/ApiSharedObject812fa01669"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "price_list",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPriceListUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "price_list": {
                "$ref": "#/components/schemas/ApiSharedObject812fa01669"
              },
              "should_sync_prices": {
                "type": "boolean"
              }
            },
            "required": [
              "price_list",
              "should_sync_prices"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPriceListDeleteResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "price_list_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "price_list_id"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseListItem": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "purchase"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "voucher_type": {
            "type": "string"
          },
          "invoice_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha del comprobante en formato YYYY-MM-DD."
          },
          "account_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha contable de la compra en formato YYYY-MM-DD."
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha de vencimiento en formato YYYY-MM-DD."
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "balance": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "string"
          },
          "supplier_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Numero de comprobante del proveedor. Hasta 120 caracteres."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "supplier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectf28d5cf256"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "required": [
          "object",
          "id",
          "voucher_type",
          "invoice_date",
          "account_date",
          "due_date",
          "total",
          "balance",
          "warehouse_id",
          "currency",
          "exchange_rate",
          "supplier_invoice_number",
          "created_at",
          "supplier",
          "tags"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "purchase"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "voucher_type": {
                  "type": "string"
                },
                "invoice_date": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Fecha del comprobante en formato YYYY-MM-DD."
                },
                "account_date": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Fecha contable de la compra en formato YYYY-MM-DD."
                },
                "due_date": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Fecha de vencimiento en formato YYYY-MM-DD."
                },
                "total": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "balance": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouse_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "type": "string"
                },
                "exchange_rate": {
                  "type": "string"
                },
                "supplier_invoice_number": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Numero de comprobante del proveedor. Hasta 120 caracteres."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "supplier": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObjectf28d5cf256"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedObject8a94344083"
                  }
                }
              },
              "required": [
                "object",
                "id",
                "voucher_type",
                "invoice_date",
                "account_date",
                "due_date",
                "total",
                "balance",
                "warehouse_id",
                "currency",
                "exchange_rate",
                "supplier_invoice_number",
                "created_at",
                "supplier",
                "tags"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiDocumentLink": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum1ba2b57809"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stable authenticated La Pyme API path. Present only when status is ready; follow redirects when downloading."
          }
        },
        "required": [
          "status",
          "url"
        ],
        "additionalProperties": false,
        "description": "Document availability. The URL requires bearer authentication and never contains a storage path or signed query string."
      },
      "ApiPurchaseDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "purchase"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "accounting": {
            "$ref": "#/components/schemas/ApiSharedObject799d3e3f37"
          },
          "voucher_type": {
            "type": "string"
          },
          "import_document_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum9e7af09974"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rol del comprobante dentro del flujo de importacion."
          },
          "import_source_purchase_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "ID de la factura comercial asociada al despacho aduanero."
          },
          "import_nationalization_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumf0d69c3d87"
              },
              {
                "type": "null"
              }
            ],
            "description": "Estado de nacionalizacion de la factura comercial de importacion."
          },
          "customs_dispatch_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Numero de despacho aduanero informado por el proveedor. Hasta 32 caracteres."
          },
          "supplier_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Numero de comprobante del proveedor. Hasta 120 caracteres."
          },
          "invoice_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha del comprobante en formato YYYY-MM-DD."
          },
          "account_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha contable de la compra en formato YYYY-MM-DD."
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fecha de vencimiento en formato YYYY-MM-DD."
          },
          "payment_term_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumd34af90520"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_perception_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "national_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_income_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_income_tax_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject95929ea589"
            }
          },
          "municipal_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "internal_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "other_tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "exempt_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "balance": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectfb7405a472"
            }
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum822a963f55"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "string"
          },
          "pdf_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Deprecated internal storage key retained for V1 compatibility. Use document.url instead; it is stable, authenticated, and storage-provider-neutral.",
            "deprecated": true
          },
          "document": {
            "$ref": "#/components/schemas/ApiSharedObject890679c3fd"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "supplier": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tax_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tax_id_type": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tax_category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "address": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "province_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "postal_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "payment_term_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "payment_term_days": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 365,
                        "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "email",
                  "phone",
                  "tax_id",
                  "tax_id_type",
                  "tax_category",
                  "address",
                  "city",
                  "province_id",
                  "postal_code",
                  "payment_term_id",
                  "payment_term_days"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "products_received": {
            "type": "boolean"
          },
          "products_returned": {
            "type": "boolean"
          },
          "inventory_effect": {
            "type": "string",
            "enum": [
              "none",
              "receive",
              "return_to_supplier",
              "legacy_inconsistent"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "quantity": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "unit_cost": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subtotal": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_rate_id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_exempt": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "total": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "discount_percentage": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "purchase_order_item_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "vat_category": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedEnum822a963f55"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "product": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "sku": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "product_type": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/ApiSharedEnumff49232140"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "sku",
                        "name",
                        "product_type"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "purchase_order": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "formatted_order_number": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "formatted_order_number"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "quantity",
                "unit_cost",
                "subtotal",
                "tax_rate_id",
                "is_exempt",
                "total",
                "discount_percentage",
                "purchase_order_item_id",
                "vat_category",
                "product",
                "purchase_order"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "object",
          "id",
          "tags",
          "voucher_type",
          "import_document_role",
          "import_source_purchase_id",
          "import_nationalization_status",
          "customs_dispatch_number",
          "supplier_invoice_number",
          "invoice_date",
          "account_date",
          "due_date",
          "payment_term_id",
          "payment_term_days",
          "vat_perception_amount",
          "national_tax_amount",
          "gross_income_tax_amount",
          "gross_income_tax_breakdown",
          "municipal_tax_amount",
          "internal_tax_amount",
          "other_tax_amount",
          "subtotal",
          "tax_amount",
          "exempt_amount",
          "total",
          "balance",
          "discount",
          "vat_breakdown",
          "notes",
          "vat_category",
          "currency",
          "exchange_rate",
          "pdf_path",
          "document",
          "created_at",
          "supplier",
          "warehouse",
          "products_received",
          "products_returned",
          "inventory_effect",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseDetailResponse": {
        "type": "object",
        "required": [
          "request_id",
          "data"
        ],
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiPurchaseDetail"
          }
        }
      },
      "ApiPurchaseDeleteResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "purchase": {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "purchase"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "deleted": {
                    "type": "boolean"
                  },
                  "stock_undone": {
                    "type": "boolean"
                  },
                  "purchase_orders_affected": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "object",
                  "id",
                  "deleted",
                  "stock_undone",
                  "purchase_orders_affected"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "purchase"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderListItem": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "purchase_order"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "integer"
          },
          "formatted_order_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnumf2073aa092"
          },
          "order_date": {
            "type": "string",
            "format": "date"
          },
          "expected_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "supplier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "required": [
          "object",
          "id",
          "order_number",
          "formatted_order_number",
          "status",
          "order_date",
          "expected_date",
          "currency",
          "supplier",
          "warehouse",
          "created_at",
          "tags"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "purchase_order"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "order_number": {
                  "type": "integer"
                },
                "formatted_order_number": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/ApiSharedEnumf2073aa092"
                },
                "order_date": {
                  "type": "string",
                  "format": "date"
                },
                "expected_date": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "type": "string"
                },
                "supplier": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouse": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedObject8a94344083"
                  }
                }
              },
              "required": [
                "object",
                "id",
                "order_number",
                "formatted_order_number",
                "status",
                "order_date",
                "expected_date",
                "currency",
                "supplier",
                "warehouse",
                "created_at",
                "tags"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "purchase_order"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "integer"
          },
          "formatted_order_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnumf2073aa092"
          },
          "order_date": {
            "type": "string",
            "format": "date"
          },
          "expected_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "supplier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectaa12edb924"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjecte6c529b31e"
            }
          }
        },
        "required": [
          "object",
          "id",
          "order_number",
          "formatted_order_number",
          "status",
          "order_date",
          "expected_date",
          "currency",
          "supplier",
          "warehouse",
          "created_at",
          "tags",
          "warehouse_id",
          "notes",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject3ebe26c85a"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderRequest": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_date": {
            "type": "string",
            "format": "date"
          },
          "expected_date": {
            "type": "string",
            "format": "date"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string"
          },
          "items": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ordered_quantity": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "expected_unit_cost": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "product_id",
                "ordered_quantity"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "supplier_id",
          "order_date",
          "warehouse_id",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderWriteResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "purchase_order": {
                "$ref": "#/components/schemas/ApiSharedObject3ebe26c85a"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "purchase_order",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderDeleteResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "purchase_order": {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "purchase_order"
                  },
                  "purchase_order_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "deleted": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "object",
                  "purchase_order_id",
                  "deleted"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "purchase_order"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderReceiptRequest": {
        "type": "object",
        "properties": {
          "items": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "purchase_order_item_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "product_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "received_quantity": {
                  "type": "number"
                }
              },
              "required": [
                "purchase_order_item_id",
                "product_id",
                "received_quantity"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "ApiPurchaseOrderReceiptResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "receipt": {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "receipt"
                  },
                  "id": {
                    "type": "string"
                  },
                  "purchase_order_warehouse_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "affected_products": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string"
                        },
                        "warehouse_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "sku",
                        "warehouse_id"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "object",
                  "id",
                  "purchase_order_warehouse_id",
                  "affected_products"
                ],
                "additionalProperties": false
              },
              "purchase_order": {
                "$ref": "#/components/schemas/ApiSharedObject3ebe26c85a"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "receipt",
              "purchase_order",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiOrderListItem": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "order"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "string"
          },
          "raw_order_number": {
            "type": "integer"
          },
          "order_date": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_name": {
            "type": "string"
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items_count": {
            "type": "integer"
          },
          "total_units": {
            "type": "integer"
          },
          "discount_amount": {
            "type": "integer",
            "minimum": 0
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "order_status": {
            "$ref": "#/components/schemas/ApiSharedEnum4ac9200c4a"
          },
          "preparation_status": {
            "$ref": "#/components/schemas/ApiSharedEnumb49e56b125"
          },
          "invoicing_status": {
            "$ref": "#/components/schemas/ApiSharedEnum2f67ddf0e8"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "order_number",
          "raw_order_number",
          "order_date",
          "customer_id",
          "customer_name",
          "customer_tax_id",
          "items_count",
          "total_units",
          "discount_amount",
          "subtotal",
          "tax_amount",
          "total",
          "currency",
          "order_status",
          "preparation_status",
          "invoicing_status",
          "notes",
          "created_at",
          "created_by_name"
        ],
        "additionalProperties": false
      },
      "ApiOrderListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "order"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "order_number": {
                  "type": "string"
                },
                "raw_order_number": {
                  "type": "integer"
                },
                "order_date": {
                  "type": "string",
                  "format": "date-time"
                },
                "customer_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "customer_name": {
                  "type": "string"
                },
                "customer_tax_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "items_count": {
                  "type": "integer"
                },
                "total_units": {
                  "type": "integer"
                },
                "discount_amount": {
                  "type": "integer",
                  "minimum": 0
                },
                "subtotal": {
                  "type": "integer",
                  "minimum": 0
                },
                "tax_amount": {
                  "type": "integer",
                  "minimum": 0
                },
                "total": {
                  "type": "integer",
                  "minimum": 0
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                },
                "order_status": {
                  "$ref": "#/components/schemas/ApiSharedEnum4ac9200c4a"
                },
                "preparation_status": {
                  "$ref": "#/components/schemas/ApiSharedEnumb49e56b125"
                },
                "invoicing_status": {
                  "$ref": "#/components/schemas/ApiSharedEnum2f67ddf0e8"
                },
                "notes": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by_name": {
                  "type": "string"
                }
              },
              "required": [
                "object",
                "id",
                "order_number",
                "raw_order_number",
                "order_date",
                "customer_id",
                "customer_name",
                "customer_tax_id",
                "items_count",
                "total_units",
                "discount_amount",
                "subtotal",
                "tax_amount",
                "total",
                "currency",
                "order_status",
                "preparation_status",
                "invoicing_status",
                "notes",
                "created_at",
                "created_by_name"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiOrderDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "order"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "string"
          },
          "raw_order_number": {
            "type": "integer"
          },
          "order_date": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_name": {
            "type": "string"
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items_count": {
            "type": "integer"
          },
          "total_units": {
            "type": "integer"
          },
          "discount_amount": {
            "type": "integer",
            "minimum": 0
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "order_status": {
            "$ref": "#/components/schemas/ApiSharedEnum4ac9200c4a"
          },
          "preparation_status": {
            "$ref": "#/components/schemas/ApiSharedEnumb49e56b125"
          },
          "invoicing_status": {
            "$ref": "#/components/schemas/ApiSharedEnum2f67ddf0e8"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "type": "string"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject57439fd94e"
            }
          },
          "active_warehouses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject6e2450633e"
            }
          },
          "pending_preparation_warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "preparations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject29d35cb5e8"
            }
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4fb237ae51"
            }
          }
        },
        "required": [
          "object",
          "id",
          "order_number",
          "raw_order_number",
          "order_date",
          "customer_id",
          "customer_name",
          "customer_tax_id",
          "items_count",
          "total_units",
          "discount_amount",
          "subtotal",
          "tax_amount",
          "total",
          "currency",
          "order_status",
          "preparation_status",
          "invoicing_status",
          "notes",
          "created_at",
          "created_by_name",
          "created_by",
          "line_items",
          "active_warehouses",
          "pending_preparation_warehouse_id",
          "preparations",
          "invoices"
        ],
        "additionalProperties": false
      },
      "ApiOrderDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObjecte94730814a"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiOrderCreateRequest": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "assigned_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "delivery_method": {
            "$ref": "#/components/schemas/ApiSharedEnumcc76b6d63a"
          },
          "order_date": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "notes": {
            "type": "string"
          },
          "discount_amount": {
            "type": "integer",
            "minimum": 0
          },
          "totals": {
            "type": "object",
            "properties": {
              "subtotal": {
                "type": "integer",
                "minimum": 0
              },
              "tax_amount": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "subtotal",
              "tax_amount",
              "total"
            ],
            "additionalProperties": false
          },
          "lines": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "product_name_snapshot": {
                  "type": "string"
                },
                "sku_snapshot": {
                  "type": "string"
                },
                "ordered_quantity": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "unit_price": {
                  "type": "integer",
                  "minimum": 0
                },
                "tax_rate_id": {
                  "type": "integer"
                },
                "discount_amount": {
                  "type": "integer",
                  "minimum": 0
                },
                "discount_percentage": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                }
              },
              "required": [
                "product_name_snapshot",
                "sku_snapshot",
                "ordered_quantity",
                "unit_price"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "customer_id",
          "assigned_warehouse_id",
          "totals",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiOrderWriteResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "order": {
                "$ref": "#/components/schemas/ApiSharedObjecte94730814a"
              },
              "idempotent_replay": {
                "type": "boolean"
              },
              "result": {}
            },
            "required": [
              "order"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiOrderPreparationCreateRequest": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject1dbe66a4f8"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "ApiOrderPreparationUpdateRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "in_progress"
            ]
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject1dbe66a4f8"
            }
          }
        },
        "additionalProperties": false
      },
      "ApiOrderPreparation": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "order_preparation"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "prepared_at": {
            "type": "string",
            "format": "date-time"
          },
          "warehouse_name": {
            "type": "string"
          },
          "delivery_method": {
            "$ref": "#/components/schemas/ApiSharedEnumcc76b6d63a"
          },
          "remito_delivery_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_remito_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectcb525e9026"
            }
          }
        },
        "required": [
          "object",
          "id",
          "prepared_at",
          "warehouse_name",
          "delivery_method",
          "remito_delivery_id",
          "formatted_remito_number",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiOrderOptionalReasonRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ApiOrderInvoiceRequest": {
        "type": "object",
        "properties": {
          "voucher_type": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "point_of_sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "notes": {
            "type": "string"
          },
          "lines": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "order_line_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity_to_invoice": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                }
              },
              "required": [
                "order_line_id",
                "quantity_to_invoice"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "voucher_type",
          "point_of_sale_id",
          "invoice_date",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiSaleListItem": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "sale"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "accounting": {
            "$ref": "#/components/schemas/ApiSharedObject799d3e3f37"
          },
          "document": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "customer": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "amounts": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "payments": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "applications": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "fiscal": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "integration": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "reverses_voucher": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "audit": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "additionalProperties": {}
      },
      "ApiSaleListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "sale"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "accounting": {
                  "$ref": "#/components/schemas/ApiSharedObject799d3e3f37"
                },
                "document": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "customer": {
                  "anyOf": [
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "amounts": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "payments": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "applications": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "fiscal": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "integration": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "reverses_voucher": {
                  "anyOf": [
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "audit": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedObject8a94344083"
                  }
                }
              },
              "additionalProperties": {}
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiSalePayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_id": {
            "type": "string",
            "format": "uuid"
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "payment_method": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject9436c33e09"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "terminal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectd1815a9bc8"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_batch_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_coupon_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_installment_plan_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "payment_id",
          "formatted_payment_number",
          "payment_number",
          "payment_date",
          "amount",
          "currency",
          "payment_method",
          "notes",
          "created_at",
          "terminal",
          "card_batch_number",
          "card_coupon_number",
          "card_installment_plan_code",
          "card_brand"
        ],
        "additionalProperties": false
      },
      "ApiSaleApplication": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "applied_amount": {
            "type": "integer"
          },
          "sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "sale_formatted_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sale_voucher_type": {
            "type": "string"
          },
          "sale_total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "created_at",
          "applied_amount",
          "sale_id",
          "sale_formatted_number",
          "sale_voucher_type",
          "sale_total"
        ],
        "additionalProperties": false
      },
      "ApiSaleDetailItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "number"
          },
          "unit_price": {
            "type": "integer",
            "minimum": 0
          },
          "unit_cost": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_percentage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "line_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum4e55733f20"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_exempt": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_custom": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "option_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectb5962fd2be"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center1": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "quantity",
          "unit_price",
          "unit_cost",
          "discount_amount",
          "discount_percentage",
          "tax_rate_id",
          "account_id",
          "line_type",
          "is_exempt",
          "is_custom",
          "name",
          "notes",
          "variant_options",
          "option_names",
          "product",
          "warehouse",
          "subtotal",
          "tax_amount",
          "total",
          "cost_center1",
          "cost_center2",
          "cost_center3"
        ],
        "additionalProperties": false
      },
      "ApiSaleDetailFullShape": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "sale"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "voucher_type": {
            "type": "string"
          },
          "customer_tax_category_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_status": {
            "type": "string"
          },
          "invoice_date": {
            "type": "string"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "balance": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "tributes_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "national_perception_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_income_perception_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "gross_income_tax_breakdown": {},
          "municipal_perception_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "internal_tribute_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "uncategorized_vat_perception_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "other_tribute_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fiscal_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cae": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cae_expiry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pdf_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pdf_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email_sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "original_sale_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "integration_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "integration_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "afip_error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "register_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "manual_associated_documents": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "customer_invoice_readiness": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "missing_data"
                ]
              },
              "missing_fields": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "customer",
                    "name",
                    "taxIdType",
                    "taxId",
                    "taxCategory",
                    "province"
                  ]
                }
              }
            },
            "required": [
              "status",
              "missing_fields"
            ],
            "additionalProperties": false
          },
          "customer": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tax_id_type": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tax_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tax_category": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "default_price_list_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "payment_term_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "payment_term_days": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 365,
                        "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "address": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "apartment": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "postal_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "description",
                  "email",
                  "phone",
                  "tax_id_type",
                  "tax_id",
                  "tax_category",
                  "default_price_list_id",
                  "payment_term_id",
                  "payment_term_days",
                  "address",
                  "apartment",
                  "city",
                  "province",
                  "postal_code"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "point_of_sale": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectb4d57efe6e"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectb0fb960111"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "number"
                },
                "unit_price": {
                  "type": "integer",
                  "minimum": 0
                },
                "unit_cost": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "discount_amount": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "discount_percentage": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_rate_id": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "account_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "line_type": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedEnum4e55733f20"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_exempt": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_custom": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "notes": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "variant_options": {
                  "anyOf": [
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "option_names": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "product": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObjectb5962fd2be"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouse": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subtotal": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_amount": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "total": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center1": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center2": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cost_center3": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "quantity",
                "unit_price",
                "unit_cost",
                "discount_amount",
                "discount_percentage",
                "tax_rate_id",
                "account_id",
                "line_type",
                "is_exempt",
                "is_custom",
                "name",
                "notes",
                "variant_options",
                "option_names",
                "product",
                "warehouse",
                "subtotal",
                "tax_amount",
                "total",
                "cost_center1",
                "cost_center2",
                "cost_center3"
              ],
              "additionalProperties": false
            }
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2e030f52be"
            }
          },
          "original_payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2e030f52be"
            }
          },
          "return_payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2e030f52be"
            }
          },
          "payment_fees_amount": {
            "type": "integer"
          },
          "credit_note_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject0d91edb167"
            }
          },
          "applied_to_invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject0d91edb167"
            }
          }
        },
        "required": [
          "object",
          "id",
          "invoice_number",
          "voucher_type",
          "customer_tax_category_override",
          "invoice_status",
          "invoice_date",
          "due_date",
          "service_from",
          "service_to",
          "subtotal",
          "tax_amount",
          "total",
          "balance",
          "tributes_amount",
          "national_perception_amount",
          "gross_income_perception_amount",
          "gross_income_tax_breakdown",
          "municipal_perception_amount",
          "internal_tribute_amount",
          "uncategorized_vat_perception_amount",
          "other_tribute_amount",
          "discount_type",
          "discount_value",
          "discount_amount",
          "notes",
          "fiscal_notes",
          "cae",
          "cae_expiry",
          "pdf_path",
          "pdf_status",
          "trigger_job_id",
          "email_status",
          "email_sent_at",
          "formatted_invoice_number",
          "original_sale_id",
          "integration_source",
          "integration_id",
          "afip_error_code",
          "currency",
          "register_id",
          "manual_associated_documents",
          "created_at",
          "updated_at",
          "customer_invoice_readiness",
          "customer",
          "point_of_sale",
          "created_by",
          "items",
          "payments",
          "original_payments",
          "return_payments",
          "payment_fees_amount",
          "credit_note_applications",
          "applied_to_invoices"
        ],
        "additionalProperties": false
      },
      "ApiSaleDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "sale"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "accounting": {
            "$ref": "#/components/schemas/ApiSharedObject799d3e3f37"
          },
          "document": {
            "$ref": "#/components/schemas/ApiSharedObject44d94dc68b"
          },
          "customer": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "amounts": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "payments": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "applications": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "fiscal": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "integration": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "reverses_voucher": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "audit": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "additionalProperties": {}
      },
      "ApiSaleMetadataPatchRequest": {
        "type": "object",
        "properties": {
          "notes": {
            "description": "Notas operativas de la venta. Enviar null o string vacio para limpiar.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "integration_source": {
            "description": "Fuente de integracion externa. Debe enviarse junto con integrationId.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "integration_id": {
            "description": "ID de referencia externa. Debe enviarse junto con integrationSource.",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "salesperson_id": {
            "description": "ID del miembro/vendedor que debe quedar asociado a la venta.",
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Actualizacion parcial de metadatos operativos de venta. Envia al menos un campo. integration_source e integration_id deben enviarse juntos; para limpiar la referencia externa, envia ambos en null.",
        "minProperties": 1
      },
      "ApiSaleDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "sale"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "accounting": {
                "$ref": "#/components/schemas/ApiSharedObject799d3e3f37"
              },
              "document": {
                "$ref": "#/components/schemas/ApiSharedObject44d94dc68b"
              },
              "customer": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "amounts": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "payments": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "applications": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "fiscal": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "integration": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "reverses_voucher": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "audit": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "tags": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiSharedObject8a94344083"
                }
              }
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiRemitoListItem": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "remito"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject7c9936d5e7"
              },
              {
                "type": "null"
              }
            ]
          },
          "origin": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectc15d6ab2fa"
              },
              {
                "$ref": "#/components/schemas/ApiSharedObject5a978938b1"
              },
              {
                "$ref": "#/components/schemas/ApiSharedObject05f64e43bb"
              }
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "number",
          "date",
          "customer",
          "origin",
          "created"
        ],
        "additionalProperties": false
      },
      "ApiRemitoListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "remito"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "customer": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject7c9936d5e7"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "origin": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObjectc15d6ab2fa"
                    },
                    {
                      "$ref": "#/components/schemas/ApiSharedObject5a978938b1"
                    },
                    {
                      "$ref": "#/components/schemas/ApiSharedObject05f64e43bb"
                    }
                  ]
                },
                "created": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "number",
                "date",
                "customer",
                "origin",
                "created"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiRemitoDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "remito"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject7c9936d5e7"
              },
              {
                "type": "null"
              }
            ]
          },
          "origin": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectc15d6ab2fa"
              },
              {
                "$ref": "#/components/schemas/ApiSharedObject5a978938b1"
              },
              {
                "$ref": "#/components/schemas/ApiSharedObject05f64e43bb"
              }
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "remito_number": {
            "type": "integer"
          },
          "point_of_sale": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectb4d57efe6e"
              },
              {
                "type": "null"
              }
            ]
          },
          "carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduled_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipient_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "recipient_dni": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "driver_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjecta1c68598bd"
            }
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "number",
          "date",
          "customer",
          "origin",
          "created",
          "remito_number",
          "point_of_sale",
          "carrier",
          "delivery_address",
          "scheduled_date",
          "delivered_at",
          "recipient_name",
          "recipient_dni",
          "driver_id",
          "notes",
          "items",
          "updated"
        ],
        "additionalProperties": false
      },
      "ApiRemitoDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "remito"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "number": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "customer": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApiSharedObject7c9936d5e7"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "origin": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ApiSharedObjectc15d6ab2fa"
                  },
                  {
                    "$ref": "#/components/schemas/ApiSharedObject5a978938b1"
                  },
                  {
                    "$ref": "#/components/schemas/ApiSharedObject05f64e43bb"
                  }
                ]
              },
              "created": {
                "type": "string",
                "format": "date-time"
              },
              "remito_number": {
                "type": "integer"
              },
              "point_of_sale": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApiSharedObjectb4d57efe6e"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "carrier": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "delivery_address": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scheduled_date": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "delivered_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "recipient_name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "recipient_dni": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "driver_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiSharedObjecta1c68598bd"
                }
              },
              "updated": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "number",
              "date",
              "customer",
              "origin",
              "created",
              "remito_number",
              "point_of_sale",
              "carrier",
              "delivery_address",
              "scheduled_date",
              "delivered_at",
              "recipient_name",
              "recipient_dni",
              "driver_id",
              "notes",
              "items",
              "updated"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiWebhookEndpoint": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "webhook_endpoint"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "enabled_events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
            }
          },
          "api_version": {
            "$ref": "#/components/schemas/ApiSharedEnum5f610d8b6a"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum1c9cda998e"
          },
          "owner_type": {
            "$ref": "#/components/schemas/ApiSharedEnum4b017f6476"
          },
          "failure_count": {
            "type": "integer",
            "minimum": 0
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "disabled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "label",
          "url",
          "enabled_events",
          "api_version",
          "status",
          "owner_type",
          "failure_count",
          "last_success_at",
          "last_failure_at",
          "disabled_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiWebhookEndpointListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject21f30ba9b5"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiWebhookEndpointResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject21f30ba9b5"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiWebhookEndpointCreateRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "enabled_events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
            }
          },
          "api_version": {
            "$ref": "#/components/schemas/ApiSharedEnum5f610d8b6a"
          }
        },
        "required": [
          "label",
          "url",
          "enabled_events"
        ],
        "additionalProperties": false
      },
      "ApiWebhookEndpointUpdateRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "enabled_events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
            }
          },
          "api_version": {
            "$ref": "#/components/schemas/ApiSharedEnum5f610d8b6a"
          }
        },
        "additionalProperties": false
      },
      "ApiWebhookEndpointSecretResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "webhook_endpoint"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "enabled_events": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
                }
              },
              "api_version": {
                "$ref": "#/components/schemas/ApiSharedEnum5f610d8b6a"
              },
              "status": {
                "$ref": "#/components/schemas/ApiSharedEnum1c9cda998e"
              },
              "owner_type": {
                "$ref": "#/components/schemas/ApiSharedEnum4b017f6476"
              },
              "failure_count": {
                "type": "integer",
                "minimum": 0
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_failure_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "disabled_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "signing_secret": {
                "type": "string"
              }
            },
            "required": [
              "object",
              "id",
              "label",
              "url",
              "enabled_events",
              "api_version",
              "status",
              "owner_type",
              "failure_count",
              "last_success_at",
              "last_failure_at",
              "disabled_at",
              "created_at",
              "updated_at",
              "signing_secret"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiWebhookEventTypeReference": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "webhook_event_type_reference"
          },
          "code": {
            "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
          },
          "resource": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "api_versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedEnum5f610d8b6a"
            }
          }
        },
        "required": [
          "object",
          "code",
          "resource",
          "description",
          "required_scopes",
          "api_versions"
        ],
        "additionalProperties": false
      },
      "ApiWebhookEventTypeListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "webhook_event_type_reference"
                },
                "code": {
                  "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
                },
                "resource": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "required_scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "api_versions": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedEnum5f610d8b6a"
                  }
                }
              },
              "required": [
                "object",
                "code",
                "resource",
                "description",
                "required_scopes",
                "api_versions"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiWebhookTestResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "webhook_test"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "webhook_endpoint_id": {
                "type": "string",
                "format": "uuid"
              },
              "delivery_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "const": "pending"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "object",
              "id",
              "webhook_endpoint_id",
              "delivery_id",
              "status",
              "created_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiTransferReadItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "number"
          },
          "received_quantity": {
            "type": "number"
          },
          "rejected_quantity": {
            "type": "number"
          },
          "product": {
            "$ref": "#/components/schemas/ApiSharedObject5970f757f8"
          }
        },
        "required": [
          "id",
          "product_id",
          "quantity",
          "received_quantity",
          "rejected_quantity",
          "product"
        ],
        "additionalProperties": false
      },
      "ApiTransferReadDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "stock_transfer"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "transfer_date": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum736f0d077b"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "updated_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_warehouse": {
            "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
          },
          "target_warehouse": {
            "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4be9a22f82"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "required": [
          "object",
          "id",
          "organization_id",
          "source_warehouse_id",
          "target_warehouse_id",
          "transfer_date",
          "notes",
          "status",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by",
          "source_warehouse",
          "target_warehouse",
          "items",
          "tags"
        ],
        "additionalProperties": false
      },
      "ApiTransferListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject0c1ddc7443"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiTransferDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject0c1ddc7443"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiCustomer": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "customer"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "province_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "company_name",
          "description",
          "email",
          "phone",
          "address",
          "apartment",
          "city",
          "delivery_carrier",
          "delivery_address",
          "tax_id",
          "tax_id_type",
          "tax_category",
          "contact_type",
          "default_price_list_id",
          "payment_term_id",
          "payment_term_days",
          "province_id",
          "is_active",
          "created_at",
          "updated_at",
          "tags"
        ],
        "additionalProperties": false
      },
      "ApiCustomerDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "customer"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "province_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_salesperson_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_ganancias_regimen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_salesperson": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectb0fb960111"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_price_list": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "sales_overview": {
            "$ref": "#/components/schemas/ApiSharedObject01ba6d4b36"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "company_name",
          "description",
          "email",
          "phone",
          "address",
          "apartment",
          "city",
          "delivery_carrier",
          "delivery_address",
          "tax_id",
          "tax_id_type",
          "tax_category",
          "contact_type",
          "default_price_list_id",
          "payment_term_id",
          "payment_term_days",
          "province_id",
          "is_active",
          "created_at",
          "updated_at",
          "tags",
          "country",
          "postal_code",
          "assigned_salesperson_id",
          "default_ganancias_regimen",
          "assigned_salesperson",
          "default_price_list",
          "sales_overview"
        ],
        "additionalProperties": false
      },
      "ApiCustomerMutationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "description": "Documento sin guiones, o \"0\" cuando tax_id_type es \"Otro\"",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "description": "\"Otro\" requiere tax_id=\"0\" y categoría efectiva Consumidor Final",
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumcb6fc950ce"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumbb2864ecea"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "province": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_salesperson_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumd34af90520"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ApiCustomerUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "description": "Documento sin guiones, o \"0\" cuando tax_id_type es \"Otro\"",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "description": "\"Otro\" requiere tax_id=\"0\" y categoría efectiva Consumidor Final",
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumcb6fc950ce"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumbb2864ecea"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "province": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_salesperson_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumd34af90520"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ApiCustomerListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "customer"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "company_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "email": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phone": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "address": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "apartment": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "city": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "delivery_carrier": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "delivery_address": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_id_type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tax_category": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contact_type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_price_list_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payment_term_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payment_term_days": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 365,
                      "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "province_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_active": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSharedObject8a94344083"
                  }
                }
              },
              "required": [
                "object",
                "id",
                "name",
                "company_name",
                "description",
                "email",
                "phone",
                "address",
                "apartment",
                "city",
                "delivery_carrier",
                "delivery_address",
                "tax_id",
                "tax_id_type",
                "tax_category",
                "contact_type",
                "default_price_list_id",
                "payment_term_id",
                "payment_term_days",
                "province_id",
                "is_active",
                "created_at",
                "updated_at",
                "tags"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiCustomerDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject70cd0320c7"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiCustomerCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "customer": {
                "$ref": "#/components/schemas/ApiSharedObject70cd0320c7"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "customer",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiCustomerUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "customer": {
                "$ref": "#/components/schemas/ApiSharedObject70cd0320c7"
              }
            },
            "required": [
              "customer"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiTag": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "tag"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "$ref": "#/components/schemas/ApiSharedEnum09f8155a9a"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "color": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum599647cb76"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "archived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "scope",
          "name",
          "slug",
          "color",
          "description",
          "archived_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiTagCreateRequest": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/ApiSharedEnum09f8155a9a"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum599647cb76"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "scope",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiTagUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "color": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum599647cb76"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "archived": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ApiApplyTagsRequest": {
        "type": "object",
        "properties": {
          "entity_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "add_tag_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "remove_tag_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "entity_ids",
          "add_tag_ids",
          "remove_tag_ids"
        ],
        "additionalProperties": false
      },
      "ApiTagsListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiTagCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "tag": {
                "$ref": "#/components/schemas/ApiSharedObject8a94344083"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "tag",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiTagUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "tag": {
                "$ref": "#/components/schemas/ApiSharedObject8a94344083"
              }
            },
            "required": [
              "tag"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiApplyTagsResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "entity_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "added": {
                "type": "integer",
                "minimum": 0
              },
              "removed": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "entity_ids",
              "added",
              "removed",
              "total"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiStockMovementRequest": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "type": "string",
            "enum": [
              "delta",
              "replace"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "operation_date": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "items": {
            "minItems": 1,
            "maxItems": 2500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "number",
                  "description": "Debe ser mayor a cero para movimientos delta. Las correcciones por reemplazo aceptan cualquier cantidad final finita, incluidos valores negativos."
                }
              },
              "required": [
                "product_id",
                "quantity"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "warehouse_id",
          "mode",
          "operation_date",
          "reason",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiStockMovementResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "stock_movement_id": {
                "type": "string",
                "format": "uuid"
              },
              "transaction_group_id": {
                "type": "string",
                "format": "uuid"
              },
              "affected_product_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "stock_movement_id",
              "transaction_group_id",
              "affected_product_ids",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPaymentMethod": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "payment_method"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum377ec234cb"
          },
          "bank_account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_percentage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_fixed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "requires_reference": {
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/ApiSharedEnum73bb779813"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "installment_plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectfd1bf60b79"
            }
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "icon",
          "type",
          "bank_account_id",
          "fee_percentage",
          "fee_fixed",
          "requires_reference",
          "visibility",
          "is_active",
          "is_default",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiPaymentMethodMutationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum377ec234cb"
          },
          "bank_account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "linked_account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_percentage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_fixed": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "requires_reference": {
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/ApiSharedEnum73bb779813"
          },
          "installment_plans": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "label"
              ],
              "additionalProperties": false
            }
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ApiPaymentMethodCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "payment_method": {
                "$ref": "#/components/schemas/ApiSharedObjectbea6e6be70"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "payment_method",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiPaymentMethodUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "payment_method": {
                "$ref": "#/components/schemas/ApiSharedObjectbea6e6be70"
              }
            },
            "required": [
              "payment_method"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiCustomerPaymentListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_date": {
            "type": "string"
          },
          "amount": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "payment_method": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject78bf4093ef"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_method_count": {
            "type": "integer"
          },
          "related_entity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectf442c4288c"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at_cursor": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "payment_date",
          "amount",
          "balance",
          "formatted_payment_number",
          "currency",
          "payment_method",
          "payment_method_count",
          "related_entity",
          "created_by",
          "created_at",
          "created_at_cursor",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiCustomerPayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "customer"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum65e97ceeee"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "settlement_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
              },
              {
                "type": "null"
              }
            ]
          },
          "settlement_total_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_rate": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "total_amount": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "splits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject63c2faf817"
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "credit_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "advance_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "withholdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4faf4c3ad5"
            }
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "contact_id",
          "contact_name",
          "payment_number",
          "formatted_payment_number",
          "payment_date",
          "currency",
          "total_amount",
          "balance",
          "created_at",
          "created_by_name"
        ],
        "additionalProperties": false
      },
      "ApiCustomerPaymentCreateRequest": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "point_of_sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_date": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "total_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "settlement_currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "settlement_total_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "type": "string"
          },
          "splits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject9e584e0f8a"
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sale_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "applied_amount": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                }
              },
              "required": [
                "sale_id",
                "applied_amount"
              ],
              "additionalProperties": false
            }
          },
          "journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
            }
          },
          "credit_journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
            }
          },
          "credit_note_applications": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "credit_sale_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "applied_amount": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                }
              },
              "required": [
                "credit_sale_id",
                "applied_amount"
              ],
              "additionalProperties": false
            }
          },
          "advance_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject6447103182"
            }
          },
          "withholdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4faf4c3ad5"
            }
          }
        },
        "required": [
          "customer_id",
          "point_of_sale_id",
          "payment_date",
          "currency",
          "total_amount",
          "splits"
        ],
        "additionalProperties": false
      },
      "ApiCustomerPaymentCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "customer_payment": {
                "$ref": "#/components/schemas/ApiSharedObjectba6d1f3759"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "customer_payment",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiCustomerPaymentListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "payment_date": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer"
                },
                "balance": {
                  "type": "integer"
                },
                "formatted_payment_number": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                },
                "payment_method": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject78bf4093ef"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payment_method_count": {
                  "type": "integer"
                },
                "related_entity": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObjectf442c4288c"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_by": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_at_cursor": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "payment_date",
                "amount",
                "balance",
                "formatted_payment_number",
                "currency",
                "payment_method",
                "payment_method_count",
                "related_entity",
                "created_by",
                "created_at",
                "created_at_cursor",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiCustomerPaymentDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "customer_payment": {
                "$ref": "#/components/schemas/ApiSharedObjectba6d1f3759"
              }
            },
            "required": [
              "customer_payment"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiCustomerPaymentVoidResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "customer_payment": {
                "$ref": "#/components/schemas/ApiSharedObjectee9c57275f"
              }
            },
            "required": [
              "customer_payment"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_date": {
            "type": "string"
          },
          "amount": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "payment_method": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject78bf4093ef"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_method_count": {
            "type": "integer"
          },
          "related_entity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject2a73ed97c3"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at_cursor": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "purchase_count": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "payment_date",
          "amount",
          "balance",
          "formatted_payment_number",
          "currency",
          "payment_method",
          "payment_method_count",
          "related_entity",
          "created_by",
          "created_at",
          "created_at_cursor",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "supplier"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum65e97ceeee"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "settlement_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
              },
              {
                "type": "null"
              }
            ]
          },
          "settlement_total_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_rate": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "total_amount": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "splits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject63c2faf817"
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "credit_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "advance_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "withholdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4faf4c3ad5"
            }
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "contact_id",
          "contact_name",
          "payment_number",
          "formatted_payment_number",
          "payment_date",
          "currency",
          "total_amount",
          "balance",
          "created_at",
          "created_by_name"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentCreateRequest": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "point_of_sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_date": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "total_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "settlement_currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "settlement_total_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "notes": {
            "type": "string"
          },
          "splits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject9e584e0f8a"
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectf91176efb5"
            }
          },
          "journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
            }
          },
          "credit_journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
            }
          },
          "credit_target_applications": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ApiSharedObjectf91176efb5"
                },
                {
                  "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
                }
              ]
            }
          },
          "credit_note_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectc2ed2476df"
            }
          },
          "advance_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject6447103182"
            }
          },
          "withholdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4faf4c3ad5"
            }
          }
        },
        "required": [
          "supplier_id",
          "point_of_sale_id",
          "payment_date",
          "currency",
          "total_amount",
          "splits"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentUpdateRequest": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "point_of_sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_date": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "total_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "settlement_currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "settlement_total_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "notes": {
            "type": "string"
          },
          "splits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "payment_method_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "amount": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "reference": {
                  "type": "string"
                },
                "card_brand": {
                  "type": "string"
                },
                "card_batch_number": {
                  "type": "string"
                },
                "card_coupon_number": {
                  "type": "string"
                },
                "card_installment_plan_code": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "fee_amount": {
                  "type": "integer",
                  "minimum": 0
                },
                "fee_percentage_applied": {
                  "type": "string"
                },
                "fee_fixed_applied": {
                  "type": "integer",
                  "minimum": 0
                },
                "net_amount": {
                  "type": "integer",
                  "minimum": 0
                },
                "register_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "safe_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "payment_method_id",
                "amount"
              ],
              "additionalProperties": false
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectf91176efb5"
            }
          },
          "journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
            }
          },
          "credit_journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
            }
          },
          "credit_target_applications": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ApiSharedObjectf91176efb5"
                },
                {
                  "$ref": "#/components/schemas/ApiSharedObjectdaa374f786"
                }
              ]
            }
          },
          "credit_note_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectc2ed2476df"
            }
          },
          "advance_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject6447103182"
            }
          },
          "withholdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4faf4c3ad5"
            }
          }
        },
        "required": [
          "supplier_id",
          "point_of_sale_id",
          "payment_date",
          "currency",
          "total_amount",
          "splits"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentCreateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "supplier_payment": {
                "$ref": "#/components/schemas/ApiSharedObjectdd60033a21"
              },
              "idempotent_replay": {
                "type": "boolean"
              }
            },
            "required": [
              "supplier_payment",
              "idempotent_replay"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentUpdateResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject18422faad3"
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "request_id",
          "data",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "payment_date": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer"
                },
                "balance": {
                  "type": "integer"
                },
                "formatted_payment_number": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                },
                "payment_method": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject78bf4093ef"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payment_method_count": {
                  "type": "integer"
                },
                "related_entity": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject2a73ed97c3"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_by": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject0fb80a7625"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_at_cursor": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "purchase_count": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "payment_date",
                "amount",
                "balance",
                "formatted_payment_number",
                "currency",
                "payment_method",
                "payment_method_count",
                "related_entity",
                "created_by",
                "created_at",
                "created_at_cursor",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject18422faad3"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiSupplierPaymentVoidResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "supplier_payment": {
                "$ref": "#/components/schemas/ApiSharedObjectee9c57275f"
              }
            },
            "required": [
              "supplier_payment"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiPaymentMethodListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectbea6e6be70"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiPaymentMethodDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObjectbea6e6be70"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiBankAccount": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "bank_account"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "bank_name": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "cbu": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "alias": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "opening_balance": {
            "type": "integer"
          },
          "opening_balance_date": {
            "type": "string",
            "format": "date"
          },
          "uses_checkbook": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnumd952d5ce8e"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "bank_name",
          "account_name",
          "cbu",
          "alias",
          "currency",
          "opening_balance",
          "opening_balance_date",
          "uses_checkbook",
          "status",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiBankAccountListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject0b48a00579"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiBankAccountDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject0b48a00579"
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiTreasuryBalance": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "treasury_balance"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "balance_type": {
            "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "native_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "native_amount_quality": {
            "$ref": "#/components/schemas/ApiSharedEnum714ff181d6"
          },
          "functional_amount": {
            "type": "integer"
          },
          "functional_currency": {
            "type": "string",
            "const": "PES"
          },
          "anomaly_count": {
            "type": "integer",
            "minimum": 0
          },
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "calculated_at": {
            "type": "string",
            "format": "date-time"
          },
          "visibility_scope": {
            "$ref": "#/components/schemas/ApiSharedEnumd440d6785b"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnumd952d5ce8e"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "balance_type",
          "name",
          "description",
          "currency",
          "native_amount",
          "native_amount_quality",
          "functional_amount",
          "functional_currency",
          "anomaly_count",
          "as_of",
          "calculated_at",
          "visibility_scope",
          "status",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiTreasuryBalanceListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "treasury_balance"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "balance_type": {
                  "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                },
                "native_amount": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "native_amount_quality": {
                  "$ref": "#/components/schemas/ApiSharedEnum714ff181d6"
                },
                "functional_amount": {
                  "type": "integer"
                },
                "functional_currency": {
                  "type": "string",
                  "const": "PES"
                },
                "anomaly_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "as_of": {
                  "type": "string",
                  "format": "date"
                },
                "calculated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "visibility_scope": {
                  "$ref": "#/components/schemas/ApiSharedEnumd440d6785b"
                },
                "status": {
                  "$ref": "#/components/schemas/ApiSharedEnumd952d5ce8e"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "object",
                "id",
                "balance_type",
                "name",
                "description",
                "currency",
                "native_amount",
                "native_amount_quality",
                "functional_amount",
                "functional_currency",
                "anomaly_count",
                "as_of",
                "calculated_at",
                "visibility_scope",
                "status",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiTreasuryMovement": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "treasury_movement"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "balance_id": {
            "type": "string",
            "format": "uuid"
          },
          "balance_type": {
            "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
          },
          "balance_name": {
            "type": "string"
          },
          "occurred_on": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "native_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "native_amount_quality": {
            "$ref": "#/components/schemas/ApiSharedEnum714ff181d6"
          },
          "functional_amount": {
            "type": "integer"
          },
          "functional_currency": {
            "type": "string",
            "const": "PES"
          },
          "functional_amount_origin": {
            "$ref": "#/components/schemas/ApiSharedEnumf03e06f92c"
          },
          "rate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject45b71eae86"
              },
              {
                "type": "null"
              }
            ]
          },
          "movement_type": {
            "$ref": "#/components/schemas/ApiSharedEnumc1c44f3acf"
          },
          "source_type": {
            "type": "string"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility_scope": {
            "$ref": "#/components/schemas/ApiSharedEnumd440d6785b"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "balance_id",
          "balance_type",
          "balance_name",
          "occurred_on",
          "currency",
          "native_amount",
          "native_amount_quality",
          "functional_amount",
          "functional_currency",
          "functional_amount_origin",
          "rate",
          "movement_type",
          "source_type",
          "source_id",
          "reference",
          "description",
          "visibility_scope",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ApiTreasuryMovementListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "treasury_movement"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "balance_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "balance_type": {
                  "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
                },
                "balance_name": {
                  "type": "string"
                },
                "occurred_on": {
                  "type": "string",
                  "format": "date"
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                },
                "native_amount": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "native_amount_quality": {
                  "$ref": "#/components/schemas/ApiSharedEnum714ff181d6"
                },
                "functional_amount": {
                  "type": "integer"
                },
                "functional_currency": {
                  "type": "string",
                  "const": "PES"
                },
                "functional_amount_origin": {
                  "$ref": "#/components/schemas/ApiSharedEnumf03e06f92c"
                },
                "rate": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedObject45b71eae86"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "movement_type": {
                  "$ref": "#/components/schemas/ApiSharedEnumc1c44f3acf"
                },
                "source_type": {
                  "type": "string"
                },
                "source_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reference": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "visibility_scope": {
                  "$ref": "#/components/schemas/ApiSharedEnumd440d6785b"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "object",
                "id",
                "balance_id",
                "balance_type",
                "balance_name",
                "occurred_on",
                "currency",
                "native_amount",
                "native_amount_quality",
                "functional_amount",
                "functional_currency",
                "functional_amount_origin",
                "rate",
                "movement_type",
                "source_type",
                "source_id",
                "reference",
                "description",
                "visibility_scope",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiFundsTransfer": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "funds_transfer"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
          },
          "destination": {
            "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "currency": {
            "type": "string",
            "const": "PES"
          },
          "occurred_on": {
            "type": "string",
            "format": "date"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "source",
          "destination",
          "amount",
          "currency",
          "occurred_on",
          "reference",
          "description",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiFundsTransferDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "funds_transfer"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
          },
          "destination": {
            "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "currency": {
            "type": "string",
            "const": "PES"
          },
          "occurred_on": {
            "type": "string",
            "format": "date"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "accounting_effects": {
            "type": "array",
            "prefixItems": [
              {
                "$ref": "#/components/schemas/ApiSharedObject077b9678d0"
              },
              {
                "$ref": "#/components/schemas/ApiSharedObject077b9678d0"
              }
            ],
            "minItems": 2,
            "items": false,
            "maxItems": 2
          }
        },
        "required": [
          "object",
          "id",
          "source",
          "destination",
          "amount",
          "currency",
          "occurred_on",
          "reference",
          "description",
          "created_at",
          "updated_at",
          "accounting_effects"
        ],
        "additionalProperties": false
      },
      "ApiFundsTransferCreateRequest": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
          },
          "destination": {
            "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "occurred_on": {
            "type": "string",
            "format": "date"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "source",
          "destination",
          "amount",
          "occurred_on"
        ],
        "additionalProperties": false
      },
      "ApiFundsTransferListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "funds_transfer"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source": {
                  "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
                },
                "destination": {
                  "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
                },
                "amount": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "currency": {
                  "type": "string",
                  "const": "PES"
                },
                "occurred_on": {
                  "type": "string",
                  "format": "date"
                },
                "reference": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "object",
                "id",
                "source",
                "destination",
                "amount",
                "currency",
                "occurred_on",
                "reference",
                "description",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiFundsTransferDetailResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "funds_transfer"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
              },
              "destination": {
                "$ref": "#/components/schemas/ApiSharedObject16a22cc706"
              },
              "amount": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "currency": {
                "type": "string",
                "const": "PES"
              },
              "occurred_on": {
                "type": "string",
                "format": "date"
              },
              "reference": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "accounting_effects": {
                "type": "array",
                "prefixItems": [
                  {
                    "$ref": "#/components/schemas/ApiSharedObject077b9678d0"
                  },
                  {
                    "$ref": "#/components/schemas/ApiSharedObject077b9678d0"
                  }
                ],
                "minItems": 2,
                "items": false,
                "maxItems": 2
              }
            },
            "required": [
              "object",
              "id",
              "source",
              "destination",
              "amount",
              "currency",
              "occurred_on",
              "reference",
              "description",
              "created_at",
              "updated_at",
              "accounting_effects"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiCashSource": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "cash_source"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum1579b1abf3"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_point_of_sale_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_point_of_sale_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "name",
          "currency",
          "warehouse_id",
          "warehouse_name",
          "default_point_of_sale_id",
          "default_point_of_sale_name",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiCashSourceListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "cash_source"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": {
                  "$ref": "#/components/schemas/ApiSharedEnum1579b1abf3"
                },
                "name": {
                  "type": "string"
                },
                "currency": {
                  "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                },
                "warehouse_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouse_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_point_of_sale_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_point_of_sale_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "object",
                "id",
                "type",
                "name",
                "currency",
                "warehouse_id",
                "warehouse_name",
                "default_point_of_sale_id",
                "default_point_of_sale_name",
                "is_active",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiPointOfSale": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "point_of_sale"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_afip_enabled": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "id",
          "number",
          "name",
          "country",
          "address",
          "warehouse_id",
          "warehouse_name",
          "is_afip_enabled",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ApiPointOfSaleListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "point_of_sale"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer"
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "country": {
                  "type": "string"
                },
                "address": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouse_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouse_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_afip_enabled": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                }
              },
              "required": [
                "object",
                "id",
                "number",
                "name",
                "country",
                "address",
                "warehouse_id",
                "warehouse_name",
                "is_afip_enabled",
                "is_active"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiInventoryWarehouse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "warehouse"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_default": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "address",
          "is_default",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ApiInventoryItem": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "inventory_item"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_name": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "option_names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "$ref": "#/components/schemas/ApiSharedEnumff49232140"
          },
          "stock": {
            "$ref": "#/components/schemas/ApiSharedObject5884d24e45"
          }
        },
        "required": [
          "object",
          "product_id",
          "product_name",
          "sku",
          "variant_options",
          "option_names",
          "category",
          "product_type",
          "stock"
        ],
        "additionalProperties": false
      },
      "ApiInventoryListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "warehouse": {
                "$ref": "#/components/schemas/ApiSharedObjectadcf6da6ce"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "inventory_item"
                    },
                    "product_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "product_name": {
                      "type": "string"
                    },
                    "sku": {
                      "type": "string"
                    },
                    "variant_options": {
                      "anyOf": [
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "option_names": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "category": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "product_type": {
                      "$ref": "#/components/schemas/ApiSharedEnumff49232140"
                    },
                    "stock": {
                      "$ref": "#/components/schemas/ApiSharedObject5884d24e45"
                    }
                  },
                  "required": [
                    "object",
                    "product_id",
                    "product_name",
                    "sku",
                    "variant_options",
                    "option_names",
                    "category",
                    "product_type",
                    "stock"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "warehouse",
              "items"
            ],
            "additionalProperties": false
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ApiInventoryMovement": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "inventory_movement"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "movement_type": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "balance": {
            "type": "number"
          },
          "quantity_change": {
            "type": "number"
          },
          "reserved_quantity_change": {
            "type": "number"
          },
          "incoming_quantity_change": {
            "type": "number"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_warehouse_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumed1129741e"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "id",
          "movement_type",
          "quantity",
          "balance",
          "quantity_change",
          "reserved_quantity_change",
          "incoming_quantity_change",
          "reason",
          "notes",
          "created_at",
          "created_by_name",
          "warehouse_name",
          "target_warehouse_name",
          "reference_type",
          "reference_id",
          "reference_label"
        ],
        "additionalProperties": false
      },
      "ApiInventoryMovementListResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "inventory_movement"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "movement_type": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number"
                },
                "balance": {
                  "type": "number"
                },
                "quantity_change": {
                  "type": "number"
                },
                "reserved_quantity_change": {
                  "type": "number"
                },
                "incoming_quantity_change": {
                  "type": "number"
                },
                "reason": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "notes": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouse_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target_warehouse_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reference_type": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ApiSharedEnumed1129741e"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reference_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reference_label": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "object",
                "id",
                "movement_type",
                "quantity",
                "balance",
                "quantity_change",
                "reserved_quantity_change",
                "incoming_quantity_change",
                "reason",
                "notes",
                "created_at",
                "created_by_name",
                "warehouse_name",
                "target_warehouse_name",
                "reference_type",
                "reference_id",
                "reference_label"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnum8d46e1ec20"
          },
          "url": {
            "type": "string",
            "description": "Requested list path."
          }
        },
        "required": [
          "request_id",
          "data",
          "has_more",
          "next_cursor",
          "object",
          "url"
        ],
        "additionalProperties": false
      },
      "ReportPeriod": {
        "type": "object",
        "required": [
          "start_date",
          "end_date"
        ],
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Period start date (YYYY-MM-DD)",
            "example": "2026-01-01"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Period end date (YYYY-MM-DD, inclusive)",
            "example": "2026-03-31"
          }
        }
      },
      "SalesReportRequest": {
        "type": "object",
        "required": [
          "source",
          "period",
          "measures"
        ],
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "sales"
            ]
          },
          "period": {
            "$ref": "#/components/schemas/ReportPeriod"
          },
          "dimensions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "date",
                    "week",
                    "weekOfYear",
                    "month",
                    "monthOfYear",
                    "dayOfWeek",
                    "year",
                    "quarter",
                    "hourOfDay",
                    "customer",
                    "customerName",
                    "customerEmail",
                    "customerTaxCategory",
                    "province",
                    "city",
                    "product",
                    "productName",
                    "variant",
                    "variantSku",
                    "category",
                    "subcategory",
                    "defaultSupplierName",
                    "productType",
                    "salesperson",
                    "pointOfSale",
                    "warehouse",
                    "register",
                    "integrationSource",
                    "voucherType",
                    "currency",
                    "paymentStatus",
                    "caeStatus",
                    "invoiceStatus",
                    "formattedInvoiceNumber",
                    "taxRate",
                    "saleLineType"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^product_metafield:[a-z][a-z0-9_]*$",
                  "description": "Product select custom field dimension. Use product_metafield:<key>, for example product_metafield:season.",
                  "examples": [
                    "product_metafield:season"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^contact_metafield:[a-z][a-z0-9_]*$",
                  "description": "Contact select custom field dimension. Use contact_metafield:<key>, for example contact_metafield:customer_segment.",
                  "examples": [
                    "contact_metafield:customer_segment"
                  ]
                }
              ]
            },
            "maxItems": 12,
            "uniqueItems": true,
            "description": "Dimensiones de agrupación. Máximo 12. Acepta product_metafield:<key> para campos personalizados select de producto y contact_metafield:<key> para campos personalizados select de contacto."
          },
          "measures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "total",
                "subtotal",
                "taxAmount",
                "count",
                "units",
                "cost",
                "margin",
                "avgTicket",
                "marginPercent",
                "discountAmount",
                "lineDiscountAmount",
                "lineDiscountRate",
                "globalDiscountAmount",
                "globalDiscountRate",
                "discountedSalesCount",
                "balance",
                "uniqueCustomers",
                "uniqueProducts"
              ]
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "Medidas a calcular. Al menos una."
          },
          "dimension_filters": {
            "type": "object",
            "description": "Filtros por dimensión. Cada clave debe ser una dimensión filtrable para la fuente. También acepta product_metafield:<key> para campos personalizados select de producto y contact_metafield:<key> para campos personalizados select de contacto cuando la fuente lo soporta. El valor es un array de IDs o valores a incluir.",
            "additionalProperties": false,
            "patternProperties": {
              "^product_metafield:[a-z][a-z0-9_]*$": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Values to include for a product select custom field dimension."
              },
              "^contact_metafield:[a-z][a-z0-9_]*$": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Values to include for a contact select custom field dimension."
              }
            },
            "properties": {
              "customer": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "customer_name": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "customer_email": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "customer_tax_category": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "province": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "city": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_name": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "variant_sku": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "category": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "subcategory": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "default_supplier_name": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "salesperson": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "point_of_sale": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "warehouse": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "register": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "integration_source": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "voucher_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "currency": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "cae_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "invoice_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "formatted_invoice_number": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "tax_rate": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "sale_line_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "customer_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "warehouse_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "point_of_sale_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "register_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              }
            }
          },
          "include_totals": {
            "type": "boolean",
            "description": "Si es true, la respuesta incluye totales agregados en el campo `totals`."
          },
          "date_basis": {
            "type": "string",
            "enum": [
              "commercial",
              "fiscal"
            ],
            "default": "commercial",
            "description": "`commercial` usa la fecha de venta. `fiscal` usa la fecha contable del comprobante."
          }
        }
      },
      "PurchasesReportRequest": {
        "type": "object",
        "required": [
          "source",
          "period",
          "measures"
        ],
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "purchases"
            ]
          },
          "period": {
            "$ref": "#/components/schemas/ReportPeriod"
          },
          "dimensions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "date",
                    "week",
                    "month",
                    "quarter",
                    "year",
                    "supplier",
                    "supplierName",
                    "supplierTaxCategory",
                    "supplierProvince",
                    "supplierCity",
                    "product",
                    "variant",
                    "category",
                    "subcategory",
                    "productType",
                    "warehouse",
                    "voucherType",
                    "currency",
                    "taxRate"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^product_metafield:[a-z][a-z0-9_]*$",
                  "description": "Product select custom field dimension. Use product_metafield:<key>, for example product_metafield:season.",
                  "examples": [
                    "product_metafield:season"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^contact_metafield:[a-z][a-z0-9_]*$",
                  "description": "Contact select custom field dimension. Use contact_metafield:<key>, for example contact_metafield:customer_segment.",
                  "examples": [
                    "contact_metafield:customer_segment"
                  ]
                }
              ]
            },
            "maxItems": 12,
            "uniqueItems": true,
            "description": "Dimensiones de agrupación. Máximo 12. Acepta product_metafield:<key> para campos personalizados select de producto y contact_metafield:<key> para campos personalizados select de contacto."
          },
          "measures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "purchaseTotal",
                "purchaseSubtotal",
                "purchaseTaxAmount",
                "purchaseCount",
                "purchaseUnits",
                "purchaseCost",
                "uniqueSuppliers",
                "avgPurchaseTicket",
                "avgPurchaseUnitCost"
              ]
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "Medidas a calcular. Al menos una."
          },
          "dimension_filters": {
            "type": "object",
            "description": "Filtros por dimensión. Cada clave debe ser una dimensión filtrable para la fuente. También acepta product_metafield:<key> para campos personalizados select de producto y contact_metafield:<key> para campos personalizados select de contacto cuando la fuente lo soporta. El valor es un array de IDs o valores a incluir.",
            "additionalProperties": false,
            "patternProperties": {
              "^product_metafield:[a-z][a-z0-9_]*$": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Values to include for a product select custom field dimension."
              },
              "^contact_metafield:[a-z][a-z0-9_]*$": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Values to include for a contact select custom field dimension."
              }
            },
            "properties": {
              "supplier": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "supplier_name": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "supplier_tax_category": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "supplier_province": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "supplier_city": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "category": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "subcategory": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "warehouse": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "voucher_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "currency": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "tax_rate": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "supplier_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "warehouse_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              }
            }
          },
          "include_totals": {
            "type": "boolean",
            "description": "Si es true, la respuesta incluye totales agregados en el campo `totals`."
          }
        }
      },
      "PaymentsReportRequest": {
        "type": "object",
        "required": [
          "source",
          "period",
          "measures"
        ],
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "payments"
            ]
          },
          "period": {
            "$ref": "#/components/schemas/ReportPeriod"
          },
          "dimensions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "date",
                    "week",
                    "weekOfYear",
                    "month",
                    "monthOfYear",
                    "dayOfWeek",
                    "year",
                    "quarter",
                    "hourOfDay",
                    "paymentContact",
                    "paymentContactName",
                    "paymentContactTaxCategory",
                    "paymentContactProvince",
                    "paymentContactCity",
                    "createdBy",
                    "pointOfSale",
                    "register",
                    "posSession",
                    "safe",
                    "paymentType",
                    "paymentRecordStatus",
                    "currency",
                    "settlementCurrency",
                    "formattedPaymentNumber",
                    "paymentMethod",
                    "paymentMethodType"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^contact_metafield:[a-z][a-z0-9_]*$",
                  "description": "Contact select custom field dimension. Use contact_metafield:<key>, for example contact_metafield:customer_segment.",
                  "examples": [
                    "contact_metafield:customer_segment"
                  ]
                }
              ]
            },
            "maxItems": 12,
            "uniqueItems": true,
            "description": "Dimensiones de agrupación. Máximo 12. Acepta contact_metafield:<key> para campos personalizados select de contacto."
          },
          "measures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "paymentCollectedTotal",
                "paymentPaidTotal",
                "paymentNetCashflow",
                "paymentGrossMovement",
                "paymentNetAmount",
                "paymentFeeAmount",
                "paymentBalance",
                "paymentCount",
                "paymentSplitCount",
                "uniquePaymentContacts",
                "avgPaymentAmount"
              ]
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "Medidas a calcular. Al menos una."
          },
          "dimension_filters": {
            "type": "object",
            "description": "Filtros por dimensión. Cada clave debe ser una dimensión filtrable para la fuente. También acepta product_metafield:<key> para campos personalizados select de producto y contact_metafield:<key> para campos personalizados select de contacto cuando la fuente lo soporta. El valor es un array de IDs o valores a incluir.",
            "additionalProperties": false,
            "patternProperties": {
              "^contact_metafield:[a-z][a-z0-9_]*$": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Values to include for a contact select custom field dimension."
              }
            },
            "properties": {
              "payment_contact": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_contact_name": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_contact_tax_category": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_contact_province": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_contact_city": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "created_by": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "point_of_sale": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "register": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "pos_session": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "safe": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_record_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "currency": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "settlement_currency": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "formatted_payment_number": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_method": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_method_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_contact_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "point_of_sale_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "register_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "safe_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "payment_method_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              }
            }
          },
          "include_totals": {
            "type": "boolean",
            "description": "Si es true, la respuesta incluye totales agregados en el campo `totals`."
          }
        }
      },
      "InventoryReportRequest": {
        "type": "object",
        "required": [
          "source",
          "measures"
        ],
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "inventory"
            ]
          },
          "period": {
            "type": "object",
            "required": [
              "start_date",
              "end_date"
            ],
            "properties": {
              "start_date": {
                "type": "string",
                "format": "date",
                "description": "Period start date (YYYY-MM-DD)",
                "example": "2026-01-01"
              },
              "end_date": {
                "type": "string",
                "format": "date",
                "description": "Period end date (YYYY-MM-DD, inclusive)",
                "example": "2026-03-31"
              }
            },
            "description": "Obligatorio cuando se piden métricas históricas de inventario, métricas derivadas de ventas o métricas de movimientos."
          },
          "dimensions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "date",
                    "week",
                    "weekOfYear",
                    "month",
                    "monthOfYear",
                    "dayOfWeek",
                    "year",
                    "quarter",
                    "product",
                    "productName",
                    "variant",
                    "variantSku",
                    "category",
                    "subcategory",
                    "defaultSupplierName",
                    "productType",
                    "currency",
                    "inventoryItemCost",
                    "warehouse"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^product_metafield:[a-z][a-z0-9_]*$",
                  "description": "Product select custom field dimension. Use product_metafield:<key>, for example product_metafield:season.",
                  "examples": [
                    "product_metafield:season"
                  ]
                }
              ]
            },
            "maxItems": 12,
            "uniqueItems": true,
            "description": "Dimensiones de agrupación. Máximo 12. Acepta product_metafield:<key> para campos personalizados select de producto."
          },
          "measures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "stockOnHand",
                "stockAvailable",
                "stockReserved",
                "stockIncoming",
                "stockValueCost",
                "stockValueRetail",
                "startingInventoryUnits",
                "endingInventoryUnits",
                "endingInventoryValue",
                "endingInventoryRetailValue",
                "daysInStock",
                "daysOutOfStock",
                "inventoryUnitsSold",
                "inventoryUnitsSoldPerDay",
                "daysOfInventoryRemaining",
                "sellThroughRate",
                "inventoryUnitsNetChange",
                "inventoryAdjustmentChange",
                "inventoryAdjustmentCount",
                "receivedQuantity",
                "transferCount",
                "transferLineItemCount",
                "uniqueItemsTransferred"
              ]
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "Measures to calculate. Inventory analytics measures are period-based; use endingInventoryUnits for the inventory balance at the end of the requested period."
          },
          "dimension_filters": {
            "type": "object",
            "description": "Filtros por dimensión. Cada clave debe ser una dimensión filtrable para la fuente. También acepta product_metafield:<key> para campos personalizados select de producto y contact_metafield:<key> para campos personalizados select de contacto cuando la fuente lo soporta. El valor es un array de IDs o valores a incluir.",
            "additionalProperties": false,
            "patternProperties": {
              "^product_metafield:[a-z][a-z0-9_]*$": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Values to include for a product select custom field dimension."
              }
            },
            "properties": {
              "product": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_name": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "variant_sku": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "category": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "subcategory": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "default_supplier_name": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "currency": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "warehouse": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "product_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "warehouse_status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "sale_line_type": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              }
            }
          },
          "include_totals": {
            "type": "boolean",
            "description": "Si es true, la respuesta incluye totales agregados en el campo `totals`."
          },
          "date_basis": {
            "type": "string",
            "enum": [
              "commercial",
              "fiscal"
            ],
            "default": "commercial",
            "description": "Aplica solo cuando se usan métricas derivadas de ventas. `commercial` usa la fecha de venta; `fiscal` usa la fecha contable."
          }
        }
      },
      "ReportRequest": {
        "oneOf": [
          {
            "title": "Ventas",
            "$ref": "#/components/schemas/SalesReportRequest"
          },
          {
            "title": "Compras",
            "$ref": "#/components/schemas/PurchasesReportRequest"
          },
          {
            "title": "Pagos",
            "$ref": "#/components/schemas/PaymentsReportRequest"
          },
          {
            "title": "Inventario",
            "$ref": "#/components/schemas/InventoryReportRequest"
          }
        ]
      },
      "ReportFlatRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Composite key from the dimension values, usable as a stable row identifier."
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Raw IDs for each dimension, in the same order as `labels`."
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Human-readable labels for each grouped dimension."
          },
          "measures": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "number"
            },
            "description": "Values for the requested measures. `currency` measures are in cents."
          }
        },
        "required": [
          "id",
          "ids",
          "labels",
          "measures"
        ],
        "additionalProperties": false
      },
      "ReportMetadata": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/ApiSharedEnum07ee8fd91e"
          },
          "dimensions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "measures": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "period": {
            "description": "Present only when the report uses period.",
            "type": "object",
            "properties": {
              "start_date": {
                "type": "string"
              },
              "end_date": {
                "type": "string"
              }
            },
            "required": [
              "start_date",
              "end_date"
            ],
            "additionalProperties": false
          },
          "date_basis": {
            "description": "Presente solo para sources que soportan dateBasis (sales, inventory con medidas derivadas).",
            "type": "string",
            "enum": [
              "commercial",
              "fiscal"
            ]
          }
        },
        "required": [
          "source",
          "dimensions",
          "measures"
        ],
        "additionalProperties": false
      },
      "ReportQueryResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "measures": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "number"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "ids",
                    "labels",
                    "measures"
                  ],
                  "additionalProperties": false
                }
              },
              "totals": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "number"
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Aggregated totals for all rows. Present only when `includeTotals: true` is sent."
              },
              "metadata": {
                "type": "object",
                "properties": {
                  "source": {
                    "$ref": "#/components/schemas/ApiSharedEnum07ee8fd91e"
                  },
                  "dimensions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "measures": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "period": {
                    "type": "object",
                    "properties": {
                      "start_date": {
                        "type": "string"
                      },
                      "end_date": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "start_date",
                      "end_date"
                    ],
                    "additionalProperties": false
                  },
                  "date_basis": {
                    "type": "string",
                    "enum": [
                      "commercial",
                      "fiscal"
                    ]
                  }
                },
                "required": [
                  "source",
                  "dimensions",
                  "measures"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "rows",
              "totals",
              "metadata"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "data"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum8d46e1ec20": {
        "type": "string",
        "enum": [
          "list"
        ],
        "description": "List-envelope discriminator."
      },
      "ApiSharedEnumd52c0ebb9c": {
        "type": "string",
        "enum": [
          "invoice",
          "debit_note",
          "credit_note",
          "receipt",
          "non_fiscal",
          "other"
        ]
      },
      "ApiSharedEnum10987946fd": {
        "type": "string",
        "enum": [
          "A",
          "B",
          "C"
        ]
      },
      "ApiSharedObject8a94344083": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "tag"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "$ref": "#/components/schemas/ApiSharedEnum09f8155a9a"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "color": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum599647cb76"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "archived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "scope",
          "name",
          "slug",
          "color",
          "description",
          "archived_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum09f8155a9a": {
        "type": "string",
        "enum": [
          "customer",
          "supplier",
          "product",
          "sale",
          "purchase",
          "purchase_order",
          "transfer"
        ]
      },
      "ApiSharedEnum599647cb76": {
        "type": "string",
        "enum": [
          "slate",
          "red",
          "orange",
          "amber",
          "yellow",
          "lime",
          "green",
          "teal",
          "cyan",
          "blue",
          "indigo",
          "violet",
          "pink"
        ]
      },
      "ApiSharedEnum250b15b651": {
        "type": "string",
        "enum": [
          "CUIL/CUIT",
          "DNI"
        ]
      },
      "ApiSharedEnumbb2864ecea": {
        "type": "string",
        "enum": [
          "registered_vat_taxpayer",
          "final_consumer",
          "monotributo_taxpayer",
          "vat_exempt",
          "vat_not_applicable"
        ]
      },
      "ApiSharedObject3028e7f4b3": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "supplier"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "province_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "company_name",
          "description",
          "email",
          "phone",
          "tax_id",
          "tax_id_type",
          "tax_category",
          "payment_term_id",
          "payment_term_days",
          "is_active",
          "tags",
          "country",
          "province_id",
          "city",
          "address",
          "apartment",
          "postal_code",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectd8582ce697": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "category"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_economic_activity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "parent_id",
          "default_economic_activity",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectadcf6da6ce": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "warehouse"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_default": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "address",
          "is_default",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum822a963f55": {
        "type": "string",
        "enum": [
          "goods",
          "fixed_assets",
          "leases",
          "services"
        ]
      },
      "ApiSharedEnumd34af90520": {
        "type": "string",
        "enum": [
          "days_7",
          "days_15",
          "days_30",
          "days_45",
          "days_60",
          "days_90",
          "days_30_60",
          "days_30_60_90"
        ]
      },
      "ApiSharedEnum9e7af09974": {
        "type": "string",
        "enum": [
          "commercial_invoice",
          "customs_dispatch",
          "customs_dispatch_reversal"
        ]
      },
      "ApiSharedEnumf0d69c3d87": {
        "type": "string",
        "enum": [
          "pending_nationalization",
          "partially_nationalized",
          "fully_nationalized"
        ]
      },
      "ApiSharedEnumde48b709b2": {
        "type": "string",
        "enum": [
          "none",
          "receive",
          "return_to_supplier"
        ]
      },
      "ApiSharedEnum6cfb146157": {
        "type": "string",
        "enum": [
          "PES",
          "DOL"
        ]
      },
      "ApiSharedObjectbf19ed87b4": {
        "type": "object",
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "unit_cost": {
            "type": "integer",
            "minimum": 0
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "is_exempt": {
            "type": "boolean"
          },
          "discount_percentage": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "purchase_order_item_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum822a963f55"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center1_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center1_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "product_id",
          "product_name",
          "sku",
          "name",
          "quantity",
          "unit_cost",
          "subtotal",
          "total",
          "tax_rate_id",
          "is_exempt",
          "discount_percentage",
          "purchase_order_item_id",
          "vat_category",
          "account_id",
          "account_name",
          "cost_center1_id",
          "cost_center1_name",
          "cost_center2_id",
          "cost_center2_name",
          "cost_center3_id",
          "cost_center3_name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectb451a3d8de": {
        "type": "object",
        "properties": {
          "will_receive_products": {
            "type": "boolean"
          },
          "will_create_receipt": {
            "type": "boolean"
          },
          "will_increase_direct_stock": {
            "type": "boolean"
          },
          "will_return_products": {
            "type": "boolean"
          },
          "will_decrease_direct_stock": {
            "type": "boolean"
          },
          "inventory_effect": {
            "$ref": "#/components/schemas/ApiSharedEnumde48b709b2"
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_line_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_quantity": {
            "type": "number",
            "minimum": 0
          },
          "purchase_order_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "will_receive_products",
          "will_create_receipt",
          "will_increase_direct_stock",
          "will_return_products",
          "will_decrease_direct_stock",
          "inventory_effect",
          "warehouse_id",
          "product_line_count",
          "total_quantity",
          "purchase_order_ids"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject3c43192c61": {
        "type": "object",
        "properties": {
          "will_create_journal_entry": {
            "type": "boolean"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "exchange_rate": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "will_create_journal_entry",
          "currency",
          "exchange_rate"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectc671832641": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject95929ea589": {
        "type": "object",
        "properties": {
          "province_id": {
            "type": "integer"
          },
          "amount": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "province_id",
          "amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjecta0d0e49f42": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "unit_cost": {
            "type": "integer",
            "minimum": 0
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "tax_rate_id": {
            "type": "integer",
            "minimum": 0
          },
          "is_exempt": {
            "type": "boolean"
          },
          "discount_percentage": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "purchase_order_item_id": {
            "type": "string",
            "format": "uuid"
          },
          "vat_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum822a963f55"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_id": {
            "description": "ID de cuenta contable imputable de Activo, Gasto o Pasivo para este renglon.",
            "type": "string",
            "format": "uuid"
          },
          "cost_center1_id": {
            "type": "string",
            "format": "uuid"
          },
          "cost_center2_id": {
            "type": "string",
            "format": "uuid"
          },
          "cost_center3_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "quantity",
          "unit_cost"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectfb7405a472": {
        "type": "object",
        "properties": {
          "tax_rate_id": {
            "type": "integer",
            "minimum": 0
          },
          "base_amount": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "tax_rate_id",
          "base_amount",
          "tax_amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectbea003a73d": {
        "type": "object",
        "properties": {
          "gravado21": {
            "type": "string",
            "format": "uuid"
          },
          "gravado27": {
            "type": "string",
            "format": "uuid"
          },
          "gravado105": {
            "type": "string",
            "format": "uuid"
          },
          "gravado25": {
            "type": "string",
            "format": "uuid"
          },
          "gravado5": {
            "type": "string",
            "format": "uuid"
          },
          "non_taxed_amount": {
            "type": "string",
            "format": "uuid"
          },
          "exento": {
            "type": "string",
            "format": "uuid"
          },
          "base_amount": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "ApiSharedObjectf61e74f9c5": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum459535dab3"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID de la caja o caja fuerte."
          }
        },
        "required": [
          "type",
          "id"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum459535dab3": {
        "type": "string",
        "enum": [
          "register",
          "safe"
        ],
        "description": "Tipo de origen de efectivo: caja operativa o caja fuerte."
      },
      "ApiSharedEnumff49232140": {
        "type": "string",
        "enum": [
          "product",
          "service",
          "combo",
          "kit"
        ]
      },
      "ApiSharedObject16c3799d74": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum539fdceccc"
          },
          "value": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "type",
          "value"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum539fdceccc": {
        "type": "string",
        "enum": [
          "percentage",
          "amount"
        ]
      },
      "ApiSharedEnum4e55733f20": {
        "type": "string",
        "enum": [
          "product",
          "shipping",
          "custom"
        ]
      },
      "ApiSharedObject55e2bcf4a7": {
        "type": "object",
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumff49232140"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "unit_price": {
            "type": "integer",
            "minimum": 0
          },
          "unit_cost": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "is_exempt": {
            "type": "boolean"
          },
          "discount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject16c3799d74"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "line_type": {
            "$ref": "#/components/schemas/ApiSharedEnum4e55733f20"
          },
          "cost_center1_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "product_id",
          "product_name",
          "sku",
          "warehouse_id",
          "name",
          "product_type",
          "quantity",
          "unit_price",
          "unit_cost",
          "tax_rate_id",
          "is_exempt",
          "discount",
          "notes",
          "account_id",
          "line_type",
          "cost_center1_id",
          "cost_center2_id",
          "cost_center3_id"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjecte4ddc41067": {
        "type": "object",
        "properties": {
          "method_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_amount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "terminal_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_batch_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_coupon_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_installment_plan_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cash_source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectf61e74f9c5"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "method_id",
          "amount",
          "description",
          "reference",
          "fee_amount",
          "terminal_id",
          "card_batch_number",
          "card_coupon_number",
          "card_installment_plan_code",
          "card_brand",
          "cash_source"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject6a71e7888b": {
        "type": "object",
        "properties": {
          "will_affect_stock": {
            "type": "boolean"
          },
          "warehouse_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "product_line_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_quantity": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "will_affect_stock",
          "warehouse_ids",
          "product_line_count",
          "total_quantity"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject9428e7100c": {
        "type": "object",
        "properties": {
          "will_create_sale_entry": {
            "type": "boolean"
          },
          "will_create_payment_entry": {
            "type": "boolean"
          }
        },
        "required": [
          "will_create_sale_entry",
          "will_create_payment_entry"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject3563932f8e": {
        "type": "object",
        "properties": {
          "invoice_status": {
            "$ref": "#/components/schemas/ApiSharedEnumd8087f784e"
          }
        },
        "required": [
          "invoice_status"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnumd8087f784e": {
        "type": "string",
        "enum": [
          "not_required",
          "pending"
        ]
      },
      "ApiSharedObject8e516a9b19": {
        "type": "object",
        "properties": {
          "will_create_payments": {
            "type": "boolean"
          },
          "payment_method_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_amount": {
            "type": "number"
          },
          "pending_amount": {
            "type": "number"
          }
        },
        "required": [
          "will_create_payments",
          "payment_method_count",
          "total_amount",
          "pending_amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum9ac70a3316": {
        "type": "string",
        "enum": [
          "not_required",
          "pending",
          "issued"
        ]
      },
      "ApiSharedEnum8b51d9e8f5": {
        "type": "string",
        "enum": [
          "not_enabled",
          "not_applicable",
          "pending",
          "posted",
          "failed"
        ]
      },
      "ApiSharedObject76de9df039": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject6f6a8f3873": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "account"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "code",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectede6d90fef": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "contact"
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject5785340ece": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "journal_entry_line"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "account": {
            "$ref": "#/components/schemas/ApiSharedObject6f6a8f3873"
          },
          "debit": {
            "type": "integer"
          },
          "credit": {
            "type": "integer"
          },
          "entered_debit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "entered_credit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectede6d90fef"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_centers": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "id",
          "account",
          "debit",
          "credit",
          "entered_debit",
          "entered_credit",
          "currency",
          "contact",
          "cost_centers",
          "description"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject263c44dc2c": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "account_ledger_line"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "journal_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "counterparty_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center1_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center2_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_center3_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "debit": {
            "type": "integer"
          },
          "credit": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "integer"
          }
        },
        "required": [
          "object",
          "id",
          "date",
          "journal_entry_id",
          "account_id",
          "source_type",
          "source_id",
          "description",
          "reference",
          "counterparty_name",
          "contact_id",
          "cost_center1_id",
          "cost_center2_id",
          "cost_center3_id",
          "debit",
          "credit",
          "currency",
          "balance"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum5433445ffc": {
        "type": "string",
        "enum": [
          "asset",
          "liability",
          "equity",
          "revenue",
          "expense"
        ]
      },
      "ApiSharedEnum1d20f1f7e9": {
        "type": "string",
        "enum": [
          "debit",
          "credit"
        ]
      },
      "ApiSharedEnum87e38e3147": {
        "type": "string",
        "enum": [
          "ar",
          "ap",
          "vat_credit",
          "vat_debit",
          "revenue",
          "cogs",
          "merchandise",
          "values_to_deposit",
          "cash_in_transit",
          "deferred_checks_payable",
          "bounced_checks",
          "check_discount_expense",
          "card_pending",
          "card_commission",
          "cash_differences",
          "customer_advances",
          "supplier_advances",
          "wh_vat_suffered",
          "iibb_credits_suffered",
          "wh_income_tax_suffered",
          "wh_suss_suffered",
          "wh_stamps_suffered",
          "wh_vat_payable",
          "wh_iibb_payable",
          "wh_income_tax_payable",
          "wh_suss_payable",
          "perc_vat_suffered",
          "perc_vat_payable",
          "perc_iibb_payable",
          "purchases_non_taxable",
          "sales_non_taxable",
          "discounts_received",
          "taxes_expense",
          "misc_expense",
          "stock_adjustment_positive",
          "stock_adjustment_negative",
          "exchange_difference",
          "recpam",
          "fiscal_year_result",
          "capital_adjustment"
        ]
      },
      "ApiSharedEnuma6084829bf": {
        "type": "string",
        "enum": [
          "revenue",
          "cogs",
          "operating_expense",
          "depreciation_amortization",
          "other_operating_income",
          "other_operating_expense",
          "financial_income",
          "financial_expense",
          "income_tax"
        ]
      },
      "ApiSharedEnumefeae30318": {
        "type": "string",
        "enum": [
          "PES",
          "DOL",
          "001",
          "060"
        ]
      },
      "ApiSharedEnum736f0d077b": {
        "type": "string",
        "enum": [
          "draft",
          "in_transit",
          "completed",
          "closed_with_difference",
          "cancelled"
        ]
      },
      "ApiSharedObject8aeeceaf0f": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject9090c617d7": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "received_quantity": {
            "type": "number",
            "minimum": 0
          },
          "rejected_quantity": {
            "type": "number",
            "minimum": 0
          },
          "product": {
            "$ref": "#/components/schemas/ApiSharedObject5970f757f8"
          }
        },
        "required": [
          "id",
          "product_id",
          "quantity",
          "received_quantity",
          "rejected_quantity",
          "product"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject5970f757f8": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "option_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "sku",
          "variant_options",
          "option_names"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectee5eae48b0": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "value"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnumfe93f70a59": {
        "type": "string",
        "enum": [
          "automatic",
          "manual_override",
          "manual_fallback",
          "base"
        ]
      },
      "ApiSharedObjectc1ee297650": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "is_automatic": {
            "type": "boolean"
          },
          "automatic_pricing_mode": {
            "$ref": "#/components/schemas/ApiSharedEnum3c5633618c"
          },
          "adjustment_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_inclusive": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "is_automatic",
          "automatic_pricing_mode",
          "adjustment_percentage",
          "source_price_list_id",
          "tax_inclusive"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum3c5633618c": {
        "type": "string",
        "enum": [
          "base_price_adjustment",
          "cost_markup"
        ]
      },
      "ApiSharedEnum6ecba1a4ce": {
        "default": "both",
        "type": "string",
        "enum": [
          "both",
          "sales",
          "purchases"
        ]
      },
      "ApiSharedEnum5f0db377e3": {
        "default": "07",
        "type": "string",
        "enum": [
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18",
          "19",
          "20",
          "21",
          "22",
          "23",
          "24",
          "25",
          "26",
          "27",
          "28",
          "29",
          "30",
          "31",
          "32",
          "33",
          "34",
          "35",
          "36",
          "37",
          "41",
          "47",
          "48",
          "49",
          "50",
          "51",
          "52",
          "53",
          "54",
          "55",
          "61",
          "62",
          "63",
          "97",
          "98",
          "99",
          "00",
          "01",
          "02",
          "03",
          "04",
          "05",
          "06",
          "07",
          "08",
          "09"
        ]
      },
      "ApiSharedEnum70385a22ba": {
        "type": "string",
        "enum": [
          "PES",
          "DOL"
        ],
        "default": "PES"
      },
      "ApiSharedObject6dbe49c4ef": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "warehouse_id",
          "quantity"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject0347948139": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "value"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjecta9f7340006": {
        "type": "object",
        "properties": {
          "total_quantity": {
            "type": "number"
          },
          "warehouse_count": {
            "type": "integer",
            "minimum": 0
          },
          "by_warehouse": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectf20bf16616"
            }
          }
        },
        "required": [
          "total_quantity",
          "warehouse_count",
          "by_warehouse"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectf20bf16616": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_name": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "on_hand": {
            "type": "number"
          },
          "reserved_quantity": {
            "type": "number"
          },
          "incoming_quantity": {
            "type": "number"
          }
        },
        "required": [
          "warehouse_id",
          "warehouse_name",
          "quantity",
          "on_hand",
          "reserved_quantity",
          "incoming_quantity"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject2ca3c1ad56": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "type": "string"
          },
          "barcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image."
          },
          "currency": {
            "type": "string"
          },
          "cost": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "tax_rate": {
            "$ref": "#/components/schemas/ApiSharedObjectee5eae48b0"
          },
          "default_supplier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "$ref": "#/components/schemas/ApiSharedEnumff49232140"
          },
          "is_active": {
            "type": "boolean"
          },
          "organization_slug": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "effective_price": {
            "type": "number"
          },
          "price_source": {
            "$ref": "#/components/schemas/ApiSharedEnumfe93f70a59"
          },
          "applied_price_list": {
            "$ref": "#/components/schemas/ApiSharedObjectc1ee297650"
          },
          "object": {
            "type": "string",
            "const": "product"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "variant_group_id": {
            "type": "string",
            "format": "uuid"
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "is_exempt": {
            "type": "boolean"
          },
          "metafields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject0347948139"
            }
          },
          "stock_summary": {
            "$ref": "#/components/schemas/ApiSharedObjecta9f7340006"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "category",
          "sku",
          "barcode",
          "image_url",
          "currency",
          "cost",
          "price",
          "tax_rate",
          "default_supplier",
          "product_type",
          "is_active",
          "organization_slug",
          "created_at",
          "updated_at",
          "object",
          "tags",
          "variant_group_id",
          "variant_options",
          "is_exempt",
          "metafields",
          "stock_summary"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject812fa01669": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "is_automatic": {
            "type": "boolean"
          },
          "automatic_pricing_mode": {
            "$ref": "#/components/schemas/ApiSharedEnum3c5633618c"
          },
          "adjustment_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_inclusive": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "const": "price_list"
          }
        },
        "required": [
          "id",
          "name",
          "is_automatic",
          "automatic_pricing_mode",
          "adjustment_percentage",
          "source_price_list_id",
          "tax_inclusive",
          "created_at",
          "object"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectf28d5cf256": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum1ba2b57809": {
        "type": "string",
        "enum": [
          "ready",
          "pending",
          "failed",
          "missing"
        ]
      },
      "ApiSharedObject799d3e3f37": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "accounting_evidence"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum8b51d9e8f5"
          },
          "journal_entry_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "journal_entries_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject76de9df039"
            }
          }
        },
        "required": [
          "object",
          "status",
          "journal_entry_ids",
          "journal_entries_url",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject890679c3fd": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum1ba2b57809"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stable authenticated La Pyme API path. Present only when status is ready; follow redirects when downloading."
          }
        },
        "required": [
          "status",
          "url"
        ],
        "additionalProperties": false,
        "description": "Document availability. The URL requires bearer authentication and never contains a storage path or signed query string."
      },
      "ApiSharedEnumf2073aa092": {
        "type": "string",
        "enum": [
          "draft",
          "sent",
          "partially_received",
          "received",
          "closed",
          "cancelled"
        ]
      },
      "ApiSharedObjectaa12edb924": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "province": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "email",
          "phone",
          "tax_id_type",
          "tax_id",
          "tax_category",
          "payment_term_id",
          "payment_term_days",
          "address",
          "apartment",
          "city",
          "province",
          "postal_code"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjecte6c529b31e": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ordered_quantity": {
            "type": "number"
          },
          "received_quantity": {
            "type": "number"
          },
          "expected_unit_cost": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "product": {
            "$ref": "#/components/schemas/ApiSharedObject92e940f6ec"
          }
        },
        "required": [
          "id",
          "ordered_quantity",
          "received_quantity",
          "expected_unit_cost",
          "product"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject92e940f6ec": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnumff49232140"
              },
              {
                "type": "null"
              }
            ]
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "option_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "sku",
          "product_type",
          "variant_options",
          "option_names"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject3ebe26c85a": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "purchase_order"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "integer"
          },
          "formatted_order_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnumf2073aa092"
          },
          "order_date": {
            "type": "string",
            "format": "date"
          },
          "expected_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "supplier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectaa12edb924"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjecte6c529b31e"
            }
          }
        },
        "required": [
          "object",
          "id",
          "order_number",
          "formatted_order_number",
          "status",
          "order_date",
          "expected_date",
          "currency",
          "supplier",
          "warehouse",
          "created_at",
          "tags",
          "warehouse_id",
          "notes",
          "items"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum4ac9200c4a": {
        "type": "string",
        "enum": [
          "open",
          "completed",
          "cancelled"
        ]
      },
      "ApiSharedEnumb49e56b125": {
        "type": "string",
        "enum": [
          "unfulfilled",
          "in_progress",
          "partially_fulfilled",
          "fulfilled",
          "cancelled"
        ]
      },
      "ApiSharedEnum2f67ddf0e8": {
        "type": "string",
        "enum": [
          "pending",
          "partially_invoiced",
          "invoiced"
        ]
      },
      "ApiSharedObject57439fd94e": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "line_number": {
            "type": "integer"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "ordered_quantity": {
            "type": "integer"
          },
          "allocated_quantity": {
            "type": "integer"
          },
          "fulfilled_quantity": {
            "type": "integer"
          },
          "invoiced_quantity": {
            "type": "integer"
          },
          "cancelled_quantity": {
            "type": "integer"
          },
          "unit_price": {
            "type": "integer",
            "minimum": 0
          },
          "tax_rate_id": {
            "type": "integer"
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "discount_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "line_number",
          "product_id",
          "product_name",
          "sku",
          "ordered_quantity",
          "allocated_quantity",
          "fulfilled_quantity",
          "invoiced_quantity",
          "cancelled_quantity",
          "unit_price",
          "tax_rate_id",
          "discount_amount",
          "discount_percentage",
          "subtotal"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject6e2450633e": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "is_default"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject29d35cb5e8": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "order_preparation"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "prepared_at": {
            "type": "string",
            "format": "date-time"
          },
          "warehouse_name": {
            "type": "string"
          },
          "delivery_method": {
            "$ref": "#/components/schemas/ApiSharedEnumcc76b6d63a"
          },
          "remito_delivery_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_remito_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectcb525e9026"
            }
          }
        },
        "required": [
          "object",
          "id",
          "prepared_at",
          "warehouse_name",
          "delivery_method",
          "remito_delivery_id",
          "formatted_remito_number",
          "lines"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnumcc76b6d63a": {
        "type": "string",
        "enum": [
          "shipping",
          "local_delivery",
          "pickup"
        ]
      },
      "ApiSharedObjectcb525e9026": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "option_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "integer"
          },
          "ordered_quantity": {
            "type": "integer"
          },
          "unit_price": {
            "type": "integer",
            "minimum": 0
          },
          "discount_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "order_line_id",
          "product_id",
          "product_name",
          "sku",
          "variant_options",
          "option_names",
          "quantity",
          "ordered_quantity",
          "unit_price",
          "discount_percentage"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject4fb237ae51": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "order_invoice"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "formatted_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_date": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "invoice_status": {
            "$ref": "#/components/schemas/ApiSharedEnum9ac70a3316"
          },
          "items_count": {
            "type": "integer"
          },
          "total_units": {
            "type": "integer"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "object",
          "id",
          "formatted_invoice_number",
          "invoice_date",
          "created_at",
          "invoice_status",
          "items_count",
          "total_units",
          "total"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjecte94730814a": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "order"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "string"
          },
          "raw_order_number": {
            "type": "integer"
          },
          "order_date": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_name": {
            "type": "string"
          },
          "customer_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "items_count": {
            "type": "integer"
          },
          "total_units": {
            "type": "integer"
          },
          "discount_amount": {
            "type": "integer",
            "minimum": 0
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "tax_amount": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "order_status": {
            "$ref": "#/components/schemas/ApiSharedEnum4ac9200c4a"
          },
          "preparation_status": {
            "$ref": "#/components/schemas/ApiSharedEnumb49e56b125"
          },
          "invoicing_status": {
            "$ref": "#/components/schemas/ApiSharedEnum2f67ddf0e8"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "type": "string"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject57439fd94e"
            }
          },
          "active_warehouses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject6e2450633e"
            }
          },
          "pending_preparation_warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "preparations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject29d35cb5e8"
            }
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4fb237ae51"
            }
          }
        },
        "required": [
          "object",
          "id",
          "order_number",
          "raw_order_number",
          "order_date",
          "customer_id",
          "customer_name",
          "customer_tax_id",
          "items_count",
          "total_units",
          "discount_amount",
          "subtotal",
          "tax_amount",
          "total",
          "currency",
          "order_status",
          "preparation_status",
          "invoicing_status",
          "notes",
          "created_at",
          "created_by_name",
          "created_by",
          "line_items",
          "active_warehouses",
          "pending_preparation_warehouse_id",
          "preparations",
          "invoices"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject1dbe66a4f8": {
        "type": "object",
        "properties": {
          "order_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "order_line_id",
          "quantity"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject9436c33e09": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "icon"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectd1815a9bc8": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "code"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectb5962fd2be": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "sku",
          "name",
          "product_type"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject0fb80a7625": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectb4d57efe6e": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "number",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectb0fb960111": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "full_name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject2e030f52be": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_id": {
            "type": "string",
            "format": "uuid"
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "payment_method": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject9436c33e09"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "terminal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectd1815a9bc8"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_batch_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_coupon_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_installment_plan_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "payment_id",
          "formatted_payment_number",
          "payment_number",
          "payment_date",
          "amount",
          "currency",
          "payment_method",
          "notes",
          "created_at",
          "terminal",
          "card_batch_number",
          "card_coupon_number",
          "card_installment_plan_code",
          "card_brand"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject0d91edb167": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "applied_amount": {
            "type": "integer"
          },
          "sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "sale_formatted_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sale_voucher_type": {
            "type": "string"
          },
          "sale_total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "created_at",
          "applied_amount",
          "sale_id",
          "sale_formatted_number",
          "sale_voucher_type",
          "sale_total"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject44d94dc68b": {
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/ApiSharedObject890679c3fd"
          }
        },
        "required": [
          "file"
        ],
        "additionalProperties": {}
      },
      "ApiSharedObject7c9936d5e7": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectc15d6ab2fa": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "sale"
          },
          "sale_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "type",
          "sale_id"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject5a978938b1": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "fulfillment"
          },
          "fulfillment_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "type",
          "fulfillment_id"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject05f64e43bb": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "custom"
          }
        },
        "required": [
          "type"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjecta1c68598bd": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sale_item_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "number"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_custom": {
            "type": "boolean"
          },
          "warehouse_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectc5d8d67e7e"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "sale_item_id",
          "quantity",
          "name",
          "is_custom",
          "warehouse_id",
          "product"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectc5d8d67e7e": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "option_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "variant_options": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "product_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum5c962a8637"
              },
              {
                "type": "null"
              }
            ]
          },
          "kit_units": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "sku",
          "name",
          "option_names",
          "variant_options",
          "product_type",
          "kit_units"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum5c962a8637": {
        "type": "string",
        "enum": [
          "product",
          "combo",
          "kit",
          "service"
        ]
      },
      "ApiSharedEnum09382f5041": {
        "type": "string",
        "enum": [
          "sale.created",
          "sale.updated",
          "order.created",
          "order.updated",
          "order.completed",
          "order.cancelled",
          "order.partially_fulfilled",
          "order.fulfilled",
          "fulfillment.created",
          "product.created",
          "product.updated",
          "webhook_endpoint.disabled"
        ]
      },
      "ApiSharedEnum5f610d8b6a": {
        "type": "string",
        "enum": [
          "2026-06-29"
        ]
      },
      "ApiSharedEnum1c9cda998e": {
        "type": "string",
        "enum": [
          "active",
          "paused",
          "disabled"
        ]
      },
      "ApiSharedEnum4b017f6476": {
        "type": "string",
        "enum": [
          "organization",
          "connected_app"
        ]
      },
      "ApiSharedObject21f30ba9b5": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "webhook_endpoint"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "enabled_events": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
            }
          },
          "api_version": {
            "$ref": "#/components/schemas/ApiSharedEnum5f610d8b6a"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum1c9cda998e"
          },
          "owner_type": {
            "$ref": "#/components/schemas/ApiSharedEnum4b017f6476"
          },
          "failure_count": {
            "type": "integer",
            "minimum": 0
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "disabled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "label",
          "url",
          "enabled_events",
          "api_version",
          "status",
          "owner_type",
          "failure_count",
          "last_success_at",
          "last_failure_at",
          "disabled_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject4be9a22f82": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "number"
          },
          "received_quantity": {
            "type": "number"
          },
          "rejected_quantity": {
            "type": "number"
          },
          "product": {
            "$ref": "#/components/schemas/ApiSharedObject5970f757f8"
          }
        },
        "required": [
          "id",
          "product_id",
          "quantity",
          "received_quantity",
          "rejected_quantity",
          "product"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject0c1ddc7443": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "stock_transfer"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "transfer_date": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum736f0d077b"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "updated_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_warehouse": {
            "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
          },
          "target_warehouse": {
            "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4be9a22f82"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          }
        },
        "required": [
          "object",
          "id",
          "organization_id",
          "source_warehouse_id",
          "target_warehouse_id",
          "transfer_date",
          "notes",
          "status",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by",
          "source_warehouse",
          "target_warehouse",
          "items",
          "tags"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject01ba6d4b36": {
        "type": "object",
        "properties": {
          "pending_balance": {
            "type": "number"
          },
          "sales_count": {
            "type": "integer",
            "minimum": 0
          },
          "total_sales": {
            "type": "number"
          },
          "recent_sales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject56326f33c2"
            }
          }
        },
        "required": [
          "pending_balance",
          "sales_count",
          "total_sales",
          "recent_sales"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject56326f33c2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "voucher_type": {
            "type": "string"
          },
          "invoice_status": {
            "type": "string"
          },
          "invoice_date": {
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "type": "number"
          },
          "formatted_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "original_sale_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "voucher_type",
          "invoice_status",
          "invoice_date",
          "currency",
          "total",
          "formatted_invoice_number",
          "original_sale_id",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnumcb6fc950ce": {
        "type": "string",
        "enum": [
          "CUIL/CUIT",
          "DNI",
          "Otro"
        ]
      },
      "ApiSharedObject70cd0320c7": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "customer"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "apartment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_id_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_price_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_term_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 365,
                "description": "Cantidad de días hasta el vencimiento. Usá 0 para Contado. Se prefiere sobre paymentTermId."
              },
              {
                "type": "null"
              }
            ]
          },
          "province_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject8a94344083"
            }
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_salesperson_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_ganancias_regimen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assigned_salesperson": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObjectb0fb960111"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_price_list": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedObject8aeeceaf0f"
              },
              {
                "type": "null"
              }
            ]
          },
          "sales_overview": {
            "$ref": "#/components/schemas/ApiSharedObject01ba6d4b36"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "company_name",
          "description",
          "email",
          "phone",
          "address",
          "apartment",
          "city",
          "delivery_carrier",
          "delivery_address",
          "tax_id",
          "tax_id_type",
          "tax_category",
          "contact_type",
          "default_price_list_id",
          "payment_term_id",
          "payment_term_days",
          "province_id",
          "is_active",
          "created_at",
          "updated_at",
          "tags",
          "country",
          "postal_code",
          "assigned_salesperson_id",
          "default_ganancias_regimen",
          "assigned_salesperson",
          "default_price_list",
          "sales_overview"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum377ec234cb": {
        "type": "string",
        "enum": [
          "cash",
          "check",
          "card",
          "bank_transfer",
          "other"
        ]
      },
      "ApiSharedEnum73bb779813": {
        "type": "string",
        "enum": [
          "sales",
          "purchases",
          "both",
          "system"
        ]
      },
      "ApiSharedObjectfd1bf60b79": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "code",
          "label",
          "sort_order",
          "is_active"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectbea6e6be70": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "payment_method"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum377ec234cb"
          },
          "bank_account_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_percentage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_fixed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "requires_reference": {
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/ApiSharedEnum73bb779813"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "installment_plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObjectfd1bf60b79"
            }
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "icon",
          "type",
          "bank_account_id",
          "fee_percentage",
          "fee_fixed",
          "requires_reference",
          "visibility",
          "is_active",
          "is_default",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject78bf4093ef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "icon"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectf442c4288c": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sale_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "number",
          "sale_id"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum65e97ceeee": {
        "type": "string",
        "enum": [
          "active",
          "voided"
        ]
      },
      "ApiSharedObject63c2faf817": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_method_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_method_name": {
            "type": "string"
          },
          "amount": {
            "type": "integer"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_batch_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_coupon_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_installment_plan_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_percentage_applied": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_fixed_applied": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "net_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "check_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "register_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "safe_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "payment_method_id",
          "amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject2cdf35e652": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_sale_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "credit_sale_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "advance_payment_id": {
            "type": "string",
            "format": "uuid"
          },
          "journal_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "applied_amount": {
            "type": "integer"
          },
          "formatted_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "credit_formatted_invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "advance_formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "applied_amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject4faf4c3ad5": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/ApiSharedEnum111b0d070e"
          },
          "province_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "regimen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount": {
            "type": "integer"
          },
          "rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "calculation_base": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "certificate_number": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "amount",
          "certificate_number"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum111b0d070e": {
        "type": "string",
        "enum": [
          "ganancias",
          "iibb",
          "iva",
          "suss",
          "seg_hig"
        ]
      },
      "ApiSharedObject9e584e0f8a": {
        "type": "object",
        "properties": {
          "payment_method_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "reference": {
            "type": "string"
          },
          "card_brand": {
            "type": "string"
          },
          "card_batch_number": {
            "type": "string"
          },
          "card_coupon_number": {
            "type": "string"
          },
          "card_installment_plan_code": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "fee_amount": {
            "type": "integer",
            "minimum": 0
          },
          "fee_percentage_applied": {
            "type": "string"
          },
          "fee_fixed_applied": {
            "type": "integer",
            "minimum": 0
          },
          "net_amount": {
            "type": "integer",
            "minimum": 0
          },
          "check_id": {
            "type": "string",
            "format": "uuid"
          },
          "check_data": {
            "$ref": "#/components/schemas/ApiSharedObjectac8b0c51cd"
          },
          "register_id": {
            "type": "string",
            "format": "uuid"
          },
          "safe_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "payment_method_id",
          "amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectac8b0c51cd": {
        "type": "object",
        "properties": {
          "origin": {
            "$ref": "#/components/schemas/ApiSharedEnumbe3790a091"
          },
          "check_format": {
            "$ref": "#/components/schemas/ApiSharedEnumbf6bff0c7b"
          },
          "number": {
            "type": "string"
          },
          "bank_name": {
            "type": "string"
          },
          "issuing_bank_account_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "issue_date": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "issuer_name": {
            "type": "string"
          }
        },
        "required": [
          "origin",
          "number",
          "amount",
          "issue_date"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnumbe3790a091": {
        "type": "string",
        "enum": [
          "own",
          "third_party"
        ]
      },
      "ApiSharedEnumbf6bff0c7b": {
        "type": "string",
        "enum": [
          "paper",
          "electronic"
        ]
      },
      "ApiSharedObjectdaa374f786": {
        "type": "object",
        "properties": {
          "journal_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "applied_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "journal_line_id",
          "applied_amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject6447103182": {
        "type": "object",
        "properties": {
          "advance_payment_id": {
            "type": "string",
            "format": "uuid"
          },
          "applied_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "advance_payment_id",
          "applied_amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectba6d1f3759": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "customer"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum65e97ceeee"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "settlement_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
              },
              {
                "type": "null"
              }
            ]
          },
          "settlement_total_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_rate": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "total_amount": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "splits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject63c2faf817"
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "credit_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "advance_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "withholdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4faf4c3ad5"
            }
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "contact_id",
          "contact_name",
          "payment_number",
          "formatted_payment_number",
          "payment_date",
          "currency",
          "total_amount",
          "balance",
          "created_at",
          "created_by_name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectee9c57275f": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "voided": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "voided"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject2a73ed97c3": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "number"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectf91176efb5": {
        "type": "object",
        "properties": {
          "purchase_id": {
            "type": "string",
            "format": "uuid"
          },
          "applied_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "purchase_id",
          "applied_amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectc2ed2476df": {
        "type": "object",
        "properties": {
          "credit_purchase_id": {
            "type": "string",
            "format": "uuid"
          },
          "applied_amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "credit_purchase_id",
          "applied_amount"
        ],
        "additionalProperties": false
      },
      "ApiSharedObjectdd60033a21": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "const": "supplier"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnum65e97ceeee"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_payment_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "settlement_currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
              },
              {
                "type": "null"
              }
            ]
          },
          "settlement_total_amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_rate": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "total_amount": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "splits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject63c2faf817"
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "credit_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "journal_line_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "advance_applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject2cdf35e652"
            }
          },
          "withholdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSharedObject4faf4c3ad5"
            }
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "contact_id",
          "contact_name",
          "payment_number",
          "formatted_payment_number",
          "payment_date",
          "currency",
          "total_amount",
          "balance",
          "created_at",
          "created_by_name"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject18422faad3": {
        "type": "object",
        "properties": {
          "supplier_payment": {
            "$ref": "#/components/schemas/ApiSharedObjectdd60033a21"
          }
        },
        "required": [
          "supplier_payment"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnumd952d5ce8e": {
        "type": "string",
        "enum": [
          "active",
          "inactive"
        ]
      },
      "ApiSharedObject0b48a00579": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "bank_account"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "bank_name": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "cbu": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "alias": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
          },
          "opening_balance": {
            "type": "integer"
          },
          "opening_balance_date": {
            "type": "string",
            "format": "date"
          },
          "uses_checkbook": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ApiSharedEnumd952d5ce8e"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "bank_name",
          "account_name",
          "cbu",
          "alias",
          "currency",
          "opening_balance",
          "opening_balance_date",
          "uses_checkbook",
          "status",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum53162db3eb": {
        "type": "string",
        "enum": [
          "bank_account",
          "register",
          "safe"
        ]
      },
      "ApiSharedEnum714ff181d6": {
        "type": "string",
        "enum": [
          "exact",
          "derived",
          "unavailable"
        ]
      },
      "ApiSharedEnumd440d6785b": {
        "type": "string",
        "enum": [
          "organization",
          "own"
        ]
      },
      "ApiSharedEnumf03e06f92c": {
        "type": "string",
        "enum": [
          "rate",
          "carrying_value",
          "legacy_unknown"
        ]
      },
      "ApiSharedObject45b71eae86": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "rate_date": {
            "type": "string",
            "format": "date"
          },
          "source": {
            "$ref": "#/components/schemas/ApiSharedEnum3e321043c1"
          }
        },
        "required": [
          "value",
          "rate_date",
          "source"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum3e321043c1": {
        "type": "string",
        "enum": [
          "bcra",
          "actual",
          "manual"
        ]
      },
      "ApiSharedEnumc1c44f3acf": {
        "type": "string",
        "enum": [
          "opening_balance",
          "customer_payment",
          "supplier_payment",
          "check_in",
          "check_out",
          "funds_transfer",
          "treasury_adjustment",
          "journal_entry"
        ]
      },
      "ApiSharedObject16a22cc706": {
        "type": "object",
        "properties": {
          "balance_type": {
            "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
          },
          "balance_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "balance_type",
          "balance_id"
        ],
        "additionalProperties": false
      },
      "ApiSharedObject077b9678d0": {
        "type": "object",
        "properties": {
          "treasury_movement_id": {
            "type": "string",
            "format": "uuid"
          },
          "balance_type": {
            "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
          },
          "balance_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "const": "PES"
          }
        },
        "required": [
          "treasury_movement_id",
          "balance_type",
          "balance_id",
          "amount",
          "currency"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnum1579b1abf3": {
        "type": "string",
        "enum": [
          "register",
          "safe"
        ]
      },
      "ApiSharedObject5884d24e45": {
        "type": "object",
        "properties": {
          "available": {
            "type": "number"
          },
          "on_hand": {
            "type": "number"
          },
          "reserved": {
            "type": "number"
          },
          "incoming": {
            "type": "number"
          }
        },
        "required": [
          "available",
          "on_hand",
          "reserved",
          "incoming"
        ],
        "additionalProperties": false
      },
      "ApiSharedEnumed1129741e": {
        "type": "string",
        "enum": [
          "sale",
          "purchase"
        ]
      },
      "ApiSharedEnum07ee8fd91e": {
        "type": "string",
        "enum": [
          "sales",
          "purchases",
          "payments",
          "inventory"
        ]
      },
      "ApiSharedEnume975a7c122": {
        "type": "string",
        "enum": [
          "invoiceDate",
          "dueDate"
        ],
        "default": "invoiceDate"
      },
      "ApiSharedEnum84c92a5072": {
        "type": "string",
        "enum": [
          "id",
          "document",
          "customer",
          "amounts",
          "items",
          "payments",
          "applications",
          "fiscal",
          "integration",
          "reversesVoucher",
          "audit",
          "tags"
        ]
      },
      "ApiSharedEnumf007ccd7a1": {
        "type": "string",
        "enum": [
          "2026-08-20"
        ]
      },
      "ApiSharedObject44d57fbeb2": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ApiSharedObject2f89490657"
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        }
      },
      "ApiSharedObject2f89490657": {
        "type": "object",
        "properties": {
          "credit_note": {
            "$ref": "#/components/schemas/ApiSharedObject2d5ef0a199"
          }
        }
      },
      "ApiSharedObject2d5ef0a199": {
        "type": "object",
        "properties": {
          "object": {
            "$ref": "#/components/schemas/ApiSharedEnumed3bc9006a"
          },
          "sale_id": {
            "type": "string",
            "format": "uuid"
          },
          "total": {
            "type": [
              "integer",
              "null"
            ]
          },
          "invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoice_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "formatted_invoice_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ApiSharedEnumed3bc9006a": {
        "type": "string",
        "enum": [
          "credit_note"
        ]
      },
      "ApiSharedEnum8ef2575a44": {
        "type": "string",
        "enum": [
          "active",
          "voided",
          "all"
        ],
        "default": "active"
      },
      "ApiSharedEnuma4e4082638": {
        "type": "string",
        "enum": [
          "equal",
          "between"
        ]
      },
      "ApiSharedEnume0cf0306aa": {
        "type": "string",
        "enum": [
          "list"
        ]
      },
      "ApiSharedEnumab9ba78640": {
        "type": "string",
        "enum": [
          "today",
          "yesterday",
          "last_7_days",
          "last_30_days",
          "last_90_days",
          "this_month",
          "previous_month",
          "this_year"
        ]
      },
      "ApiSharedObject682bce59ac": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Incluí tu API key en el header Authorization con el prefijo Bearer."
      }
    }
  },
  "paths": {
    "/api/v1/organization": {
      "get": {
        "summary": "Obtener la organización autenticada",
        "description": "Devuelve una proyección segura de identidad fiscal y defaults operativos. No incluye settings internos, CBU, billing, límites, permisos ni credenciales de integraciones.",
        "operationId": "getApiOrganization",
        "tags": [
          "API"
        ],
        "responses": {
          "200": {
            "description": "Organización autenticada obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrganizationResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope settings:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope settings:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Organización inexistente o inactiva",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Organización inexistente o inactiva",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst organization = await lapyme.organization.get();\n"
          }
        ]
      }
    },
    "/api/v1/bank-accounts": {
      "get": {
        "summary": "Listar cuentas bancarias",
        "description": "Lista referencias de cuentas bancarias para integraciones de tesorería y pagos. No expone IDs contables internos ni permite administrar la configuración.",
        "operationId": "listApiBankAccounts",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumd952d5ce8e"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Busca por ID, banco, nombre de cuenta, CBU o alias",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cuentas bancarias obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBankAccountListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope treasury:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope treasury:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "treasury:read"
        ]
      }
    },
    "/api/v1/bank-accounts/{bank_account_id}": {
      "get": {
        "summary": "Obtener una cuenta bancaria",
        "description": "Devuelve la configuración pública de una cuenta bancaria sin exponer su cuenta contable interna. Los saldos se consultan por separado.",
        "operationId": "getApiBankAccount",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "bank_account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cuenta bancaria obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBankAccountDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "ID o parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "ID o parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope treasury:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope treasury:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cuenta bancaria no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Cuenta bancaria no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "treasury:read"
        ]
      }
    },
    "/api/v1/treasury/balances": {
      "get": {
        "summary": "Listar saldos de tesorería",
        "description": "Lista saldos funcionales en PES derivados del diario contable para cuentas bancarias, cajas registradoras y cajas fuertes denominadas en PES. Las fuentes DOL quedan fuera hasta que exista un contrato canónico de importes nativos y contables.",
        "operationId": "listApiTreasuryBalances",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "balance_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
            }
          },
          {
            "name": "balance_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumd952d5ce8e"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "description": "Fecha argentina inclusive para calcular los saldos",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saldos de tesorería obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTreasuryBalanceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope treasury:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope treasury:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "treasury:read"
        ]
      }
    },
    "/api/v1/treasury/movements": {
      "get": {
        "summary": "Listar movimientos de tesorería",
        "description": "Lista movimientos funcionales en PES respaldados por el diario para fuentes denominadas en PES. Un importe positivo aumenta el saldo y uno negativo lo reduce; las fuentes DOL no se publican todavía.",
        "operationId": "listApiTreasuryMovements",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "balance_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
            }
          },
          {
            "name": "balance_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "movement_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumc1c44f3acf"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Movimientos de tesorería obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTreasuryMovementListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope treasury:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope treasury:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "treasury:read"
        ]
      }
    },
    "/api/v1/funds-transfers": {
      "get": {
        "summary": "Listar transferencias de fondos",
        "description": "Lista transferencias PES visibles en orden determinista por fecha de negocio, creación e ID. El filtro de saldo requiere balance_type y balance_id y coincide con cualquiera de las dos puntas.",
        "operationId": "listApiFundsTransfers",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "balance_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum53162db3eb"
            }
          },
          {
            "name": "balance_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha de negocio argentina inicial inclusiva",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha de negocio argentina final inclusiva",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transferencias de fondos obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFundsTransferListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope treasury:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope treasury:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "treasury:read"
        ]
      },
      "post": {
        "summary": "Crear una transferencia de fondos",
        "description": "Mueve un importe entero en centavos entre dos saldos PES visibles y devuelve el hecho confirmado con sus dos efectos contables. La operación es atómica, permite saldo negativo y exige Idempotency-Key.",
        "operationId": "createApiFundsTransfer",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiFundsTransferCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Transferencia creada o reproducida idempotentemente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFundsTransferDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud o Idempotency-Key inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud o Idempotency-Key inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope treasury:write faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope treasury:write faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Saldo inexistente, oculto o de otra organización",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Saldo inexistente, oculto o de otra organización",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o estado del saldo o cuenta vinculada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o estado del saldo o cuenta vinculada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Moneda no soportada, fecha futura o configuración contable faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Moneda no soportada, fecha futura o configuración contable faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Falla transitoria; el cliente puede reintentar",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Falla transitoria; el cliente puede reintentar",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "treasury:write"
        ]
      }
    },
    "/api/v1/funds-transfers/{funds_transfer_id}": {
      "get": {
        "summary": "Obtener una transferencia de fondos",
        "description": "Devuelve una transferencia PES visible y exactamente dos efectos contables firmados, ordenados origen y destino, vinculados a movimientos de tesorería.",
        "operationId": "getApiFundsTransfer",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "funds_transfer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transferencia de fondos obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiFundsTransferDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "ID o parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "ID o parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope treasury:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope treasury:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Transferencia no encontrada o no visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Transferencia no encontrada o no visible",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno o evidencia contable inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno o evidencia contable inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "treasury:read"
        ]
      }
    },
    "/api/v1/tax-rates": {
      "get": {
        "summary": "Listar alícuotas impositivas",
        "description": "Lista los códigos estatutarios de IVA aceptados por los campos públicos tax_rate_id. El code es el identificador legal estable; no es un UUID de recurso de la organización.",
        "operationId": "listApiTaxRates",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Alícuotas obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaxRateReferenceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope settings:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope settings:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst taxRates = await lapyme.taxRates.list({ limit: 100 });\n"
          }
        ]
      }
    },
    "/api/v1/voucher-types": {
      "get": {
        "summary": "Listar tipos de comprobante válidos",
        "description": "Devuelve candidatos contextuales para una venta o compra. La selección usa la configuración fiscal canónica de la organización y vuelve a validarse al escribir. Para ventas con total_amount, currency es obligatorio; DOL también requiere exchange_rate en PES por DOL.",
        "operationId": "listApiVoucherTypes",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "operation",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumed1129741e"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "UUID obligatorio cuando operation=sale",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "point_of_sale_id",
            "in": "query",
            "description": "UUID obligatorio cuando operation=sale",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "supplier_id",
            "in": "query",
            "description": "UUID obligatorio cuando operation=purchase",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "total_amount",
            "in": "query",
            "description": "Total opcional de la venta en unidades menores de currency. Habilita la evaluación de FCE.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "Obligatorio cuando se envía total_amount",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
            }
          },
          {
            "name": "exchange_rate",
            "in": "query",
            "description": "Pesos argentinos por dólar. Obligatorio solamente para currency=DOL.",
            "required": false,
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tipos de comprobante obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiVoucherTypeReferenceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Contexto inválido o incompleto",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Contexto inválido o incompleto",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope settings:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope settings:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Contraparte o punto de venta inexistente o inaccesible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Contraparte o punto de venta inexistente o inaccesible",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "settings:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst voucherTypes = await lapyme.voucherTypes.list({\n  operation: \"sale\",\n  customerId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  pointOfSaleId: \"8b1743dc-59fd-4d56-93f0-4f10c70e4569\",\n  totalAmount: 500000000,\n  currency: \"PES\",\n});\n"
          }
        ]
      }
    },
    "/api/v1/suppliers": {
      "get": {
        "summary": "Listar proveedores",
        "description": "Devuelve una lista de proveedores de la organización. Permite buscar por nombre, CUIT o email.",
        "operationId": "listApiSuppliers",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre, CUIT o email",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "description": "Filtra por estado activo",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Proveedores obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_suppliers_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing suppliers",
                        "retryable": false,
                        "details": [
                          {
                            "field": "limit",
                            "code": "too_big",
                            "message": "Too big: expected number to be <=100"
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_suppliers_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_suppliers_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_suppliers_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list suppliers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "suppliers:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst suppliers = await lapyme.suppliers.list({\n  limit: 20,\n  query: \"Textiles\",\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear proveedor",
        "description": "Crea un proveedor para usarlo en compras, cuentas corrientes y reportes.",
        "operationId": "createApiSupplier",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Proveedor creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "suppliers:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst supplier = await lapyme.suppliers.createSupplier({\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    name: \"Textiles Norte\",\n    taxId: \"30700111222\",\n    email: \"ventas@textilesnorte.com.ar\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/suppliers/{supplier_id}": {
      "get": {
        "summary": "Obtener proveedor",
        "description": "Devuelve los datos de un proveedor por ID.",
        "operationId": "getApiSupplier",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "supplier_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Proveedor obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Proveedor no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Proveedor no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "suppliers:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst supplier = await lapyme.suppliers.getSupplier({\n  supplierId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "put": {
        "summary": "Actualizar proveedor",
        "description": "Actualiza los datos comerciales, fiscales y de contacto de un proveedor.",
        "operationId": "updateApiSupplier",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "supplier_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Proveedor actualizado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Proveedor no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Proveedor no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "suppliers:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst supplier = await lapyme.suppliers.updateSupplier({\n  supplierId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  body: {\n    email: \"administracion@textilesnorte.com.ar\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/categories": {
      "get": {
        "summary": "Listar categorías",
        "description": "Devuelve las categorías de productos de la organización.",
        "operationId": "listApiCategories",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Categorías obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCategoryListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "categories:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst categories = await lapyme.categories.get({\n  limit: 20,\n  query: \"indumentaria\",\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear categoría",
        "description": "Crea una categoría para organizar productos y asociar actividad económica predeterminada.",
        "operationId": "createApiCategory",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCategoryMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Categoría creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCategoryCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "categories:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst category = await lapyme.categories.create({\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    name: \"Indumentaria\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/categories/{category_id}": {
      "get": {
        "summary": "Obtener categoría",
        "description": "Devuelve una categoría por ID.",
        "operationId": "getApiCategory",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Categoría obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCategoryDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Categoría no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Categoría no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "categories:read"
        ]
      },
      "put": {
        "summary": "Actualizar categoría",
        "description": "Actualiza el nombre, la categoría padre o la actividad económica de una categoría.",
        "operationId": "updateApiCategory",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCategoryMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Categoría actualizada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCategoryUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Categoría no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Categoría no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "categories:write"
        ]
      }
    },
    "/api/v1/products": {
      "get": {
        "summary": "Listar productos",
        "description": "Lista los productos de la organización con precios. Soporta búsqueda y filtros por categoría, tipo y estado.",
        "operationId": "listApiProducts",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre, SKU, código de barras u opciones",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "description": "Filtra por categoría",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "description": "Filtra por estado activo",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "product_type",
            "in": "query",
            "description": "Filtra por tipo de producto",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumff49232140"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Productos obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_products_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_products_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_products_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_products_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst products = await lapyme.products.list({\n  limit: 20,\n  query: \"remera\",\n  productType: \"product\",\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear producto",
        "description": "Crea un producto simple, servicio, combo o kit, o un producto con hasta tres opciones y 250 variantes. En la creación con variantes, cada variante define su combinación, SKU, precios y stock inicial.",
        "operationId": "createApiProduct",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar la misma creación de producto.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProductMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Producto creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_product_create_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_product_create_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_product_create_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Recurso relacionado inexistente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_product_create_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Category not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_product_create_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A product with this SKU already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_product_create_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the product",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst product = await lapyme.products.create({\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    name: \"Remera basica\",\n    sku: \"REM-BASICA-M\",\n    productType: \"product\",\n    price: 1250000,\n    cost: 700000,\n    currency: \"PES\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/products/bulk-adjustments": {
      "post": {
        "summary": "Actualizar productos masivamente",
        "description": "Aplica ajustes masivos de costo o precio base sobre una selección de productos.",
        "operationId": "createApiProductBulkAdjustment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar aplicar dos veces el mismo ajuste masivo.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProductBulkAdjustmentRequest"
              },
              "examples": {
                "supplierCostIncrease": {
                  "summary": "Aumento de costos por proveedor",
                  "value": {
                    "target": "cost",
                    "operation_type": "increase",
                    "adjustment_type": "percentage",
                    "adjustment_value": 5,
                    "default_supplier_id": "550e8400-e29b-41d4-a716-446655440201",
                    "selection": {
                      "type": "all",
                      "excluded_ids": []
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ajuste aplicado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductBulkAdjustmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_product_bulk_adjust_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for bulk adjusting products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_product_bulk_adjust_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_product_bulk_adjust_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "IDEMPOTENCY_CONFLICT",
                    "value": {
                      "request_id": "req_product_bulk_adjust_1",
                      "error": {
                        "code": "IDEMPOTENCY_CONFLICT",
                        "message": "The same Idempotency-Key was already used with a different bulk adjustment.",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_product_bulk_adjust_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not bulk adjust products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst adjustment = await lapyme.productBulkAdjustments.create({\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    target: \"price\",\n    operationType: \"increase\",\n    adjustmentType: \"percentage\",\n    adjustmentValue: 10,\n    selection: {\n      type: \"specific\",\n      ids: [\"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\"],\n    },\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/products/metafield-definitions": {
      "get": {
        "summary": "Listar definiciones de campos personalizados de productos",
        "description": "Devuelve las definiciones no sistémicas disponibles para productos. La disponibilidad depende de que los campos personalizados estén habilitados para la organización.",
        "operationId": "listApiProductMetafieldDefinitions",
        "tags": [
          "API"
        ],
        "responses": {
          "200": {
            "description": "Definiciones obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductMetafieldDefinitionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_product_metafields_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "Authentication required",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o funcionalidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_product_metafields_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Los campos personalizados no están incluidos en tu contrato actual",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_product_metafields_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list product metafield definitions",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:read"
        ]
      }
    },
    "/api/v1/products/{product_id}": {
      "get": {
        "summary": "Obtener producto por ID",
        "description": "Devuelve el detalle persistido del producto.",
        "operationId": "getApiProductById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "description": "ID del producto",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Producto obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetro inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_product_detail_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for retrieving the product",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_product_detail_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_product_detail_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Producto no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_product_detail_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Product not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_product_detail_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not retrieve the product",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst product = await lapyme.products.getProductById({\n  productId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "put": {
        "summary": "Actualizar producto",
        "description": "Actualiza un producto y devuelve el detalle persistido.",
        "operationId": "updateApiProduct",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "description": "ID del producto",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProductUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Producto actualizado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_product_update_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for updating products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_product_update_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_product_update_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Producto o recurso relacionado inexistente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_product_update_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Product not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_product_update_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A product with this SKU already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_product_update_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not update the product",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst product = await lapyme.products.update({\n  productId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  body: {\n    price: 1390000,\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/products/{product_id}/metafields": {
      "patch": {
        "summary": "Actualizar campos personalizados de un producto",
        "description": "Actualiza solo las claves enviadas. Un string asigna el valor y null lo elimina. Los valores pertenecen al grupo y se comparten entre variantes. La disponibilidad depende de que los campos personalizados estén habilitados para la organización.",
        "operationId": "patchApiProductMetafields",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProductMetafieldPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Campos actualizados exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud o valor inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_product_metafields_patch_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid product metafield request",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_product_metafields_patch_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "Authentication required",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o funcionalidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_product_metafields_patch_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Los campos personalizados no están incluidos en tu contrato actual",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Producto no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_product_metafields_patch_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Product not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_product_metafields_patch_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not update product metafields",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:write"
        ]
      }
    },
    "/api/v1/warehouses": {
      "get": {
        "summary": "Listar depósitos",
        "description": "Lista los depósitos activos de la organización.",
        "operationId": "listApiWarehouses",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ubicaciones obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWarehouseListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_warehouses_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing warehouses",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_warehouses_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_warehouses_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_warehouses_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list warehouses",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "warehouses:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst warehouses = await lapyme.warehouses.list({\n  limit: 20,\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear depósito",
        "description": "Crea un depósito para operar stock, puntos de venta y disponibilidad.",
        "operationId": "createApiWarehouse",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar la misma creación de depósito.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiWarehouseMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Depósito creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWarehouseCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_warehouse_create_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating warehouses",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_warehouse_create_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_warehouse_create_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_warehouse_create_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A warehouse with this name already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_warehouse_create_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the warehouse",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "warehouses:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst warehouse = await lapyme.warehouses.create({\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    name: \"Deposito central\",\n    address: \"Av. Corrientes 1234\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/warehouses/{warehouse_id}": {
      "get": {
        "summary": "Obtener depósito por ID",
        "description": "Devuelve el detalle del depósito.",
        "operationId": "getApiWarehouseById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "path",
            "description": "ID del depósito",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Depósito obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWarehouseDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetro inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_warehouse_detail_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for retrieving the warehouse",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_warehouse_detail_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_warehouse_detail_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Depósito no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_warehouse_detail_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Warehouse not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_warehouse_detail_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not retrieve the warehouse",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "warehouses:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst warehouse = await lapyme.warehouses.getWarehouseById({\n  warehouseId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "put": {
        "summary": "Actualizar depósito",
        "description": "Actualiza un depósito y devuelve el detalle persistido.",
        "operationId": "updateApiWarehouse",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "path",
            "description": "ID del depósito",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiWarehouseUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Depósito actualizado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWarehouseUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_warehouse_update_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for updating warehouses",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_warehouse_update_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_warehouse_update_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Depósito no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_warehouse_update_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Warehouse not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_warehouse_update_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A warehouse with this name already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_warehouse_update_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not update the warehouse",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "warehouses:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst warehouse = await lapyme.warehouses.updateWarehouse({\n  warehouseId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  body: {\n    name: \"Deposito central\",\n    address: \"Av. Corrientes 1234\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/price-lists": {
      "get": {
        "summary": "Listar listas de precios",
        "description": "Lista las listas de precios de la organización.",
        "operationId": "listApiPriceLists",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Listas de precios obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPriceListListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_price_lists_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing price lists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_price_lists_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_price_lists_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_price_lists_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list price lists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "price_lists:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst priceLists = await lapyme.priceLists.get({\n  limit: 20,\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear lista de precios",
        "description": "Crea una lista de precios para vender con reglas y valores comerciales diferenciados.",
        "operationId": "createApiPriceList",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar la misma creación de lista de precios.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPriceListMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lista de precios creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPriceListCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_price_list_create_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating price lists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_price_list_create_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_price_list_create_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_price_list_create_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A price list with this name already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_price_list_create_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the price list",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "price_lists:write"
        ]
      }
    },
    "/api/v1/price-lists/{price_list_id}": {
      "get": {
        "summary": "Obtener lista de precios por ID",
        "description": "Devuelve el detalle de la lista de precios.",
        "operationId": "getApiPriceListById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "price_list_id",
            "in": "path",
            "description": "ID de la lista de precios",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de precios obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPriceListDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetro inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_price_list_detail_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for retrieving the price list",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_price_list_detail_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_price_list_detail_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Lista de precios no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_price_list_detail_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Price list not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_price_list_detail_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not retrieve the price list",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "price_lists:read"
        ]
      },
      "put": {
        "summary": "Actualizar lista de precios",
        "description": "Actualiza una lista de precios y devuelve el detalle persistido, incluyendo si se disparó la sincronización de precios.",
        "operationId": "updateApiPriceList",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "price_list_id",
            "in": "path",
            "description": "ID de la lista de precios",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPriceListMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lista de precios actualizada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPriceListUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_price_list_update_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for updating price lists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_price_list_update_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_price_list_update_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Lista de precios o recurso relacionado no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_price_list_update_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Price list not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_price_list_update_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A price list with this name already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_price_list_update_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not update the price list",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "price_lists:write"
        ]
      },
      "delete": {
        "summary": "Eliminar lista de precios",
        "description": "Elimina una lista de precios existente.",
        "operationId": "deleteApiPriceList",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "price_list_id",
            "in": "path",
            "description": "ID de la lista de precios",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de precios eliminada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPriceListDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetro inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_price_list_delete_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for deleting the price list",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_price_list_delete_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_price_list_delete_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Lista de precios no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_price_list_delete_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Price list not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_price_list_delete_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "Could not delete the price list",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_price_list_delete_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not delete the price list",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "price_lists:write"
        ]
      }
    },
    "/api/v1/purchases": {
      "get": {
        "summary": "Listar compras",
        "description": "Lista las compras de la organización. Soporta filtros por fecha, importe y búsqueda de proveedor.",
        "operationId": "listApiPurchases",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por proveedor, CUIT o número de factura del proveedor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial para el filtro",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final para el filtro",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_attribute",
            "in": "query",
            "description": "Campo de fecha a usar para el filtro",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnume975a7c122"
            }
          },
          {
            "name": "amount_attribute",
            "in": "query",
            "description": "Campo monetario a usar para min/max",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "balance",
                "total"
              ],
              "default": "balance"
            }
          },
          {
            "name": "min_balance",
            "in": "query",
            "description": "Importe mínimo para el filtro",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "max_balance",
            "in": "query",
            "description": "Importe máximo para el filtro",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compras obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_purchase_list_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing purchases",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_purchase_list_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_purchase_list_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_purchase_list_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list purchases",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst purchases = await lapyme.purchases.listPurchases({\n  limit: 20,\n  dateFrom: new Date(\"2026-03-01\"),\n  dateTo: new Date(\"2026-03-31\"),\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear compra",
        "description": "Registra una compra y devuelve la operación creada junto con sus efectos de stock y contabilidad.",
        "operationId": "createApiPurchase",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar la misma creación de compra.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPurchaseTransactionRequest"
              },
              "examples": {
                "purchase_without_receipt": {
                  "summary": "Purchase invoice without receiving stock",
                  "value": {
                    "supplier_id": "afafcbec-9d94-4174-8d5c-ec8d72780947",
                    "voucher_type": 1,
                    "supplier_invoice_number": "0001-00000001",
                    "invoice_date": "2026-03-10",
                    "currency": "PES",
                    "exchange_rate": 1,
                    "products_received": false,
                    "update_product_variant_cost": true,
                    "items": [
                      {
                        "product_id": "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
                        "quantity": 1,
                        "unit_cost": 8250,
                        "tax_rate_id": 5
                      }
                    ]
                  }
                },
                "service_expense_with_accounting_allocation": {
                  "summary": "Service expense with account and cost center",
                  "value": {
                    "supplier_id": "afafcbec-9d94-4174-8d5c-ec8d72780947",
                    "voucher_type": 1,
                    "supplier_invoice_number": "0001-00000003",
                    "invoice_date": "2026-03-10",
                    "currency": "PES",
                    "products_received": false,
                    "items": [
                      {
                        "name": "Meta Ads",
                        "quantity": 1,
                        "unit_cost": 100000,
                        "tax_rate_id": 5,
                        "account_id": "550e8400-e29b-41d4-a716-446655440301",
                        "cost_center_1_id": "550e8400-e29b-41d4-a716-446655440401"
                      }
                    ]
                  }
                },
                "totals_only_with_manual_accounts": {
                  "summary": "Totals-only purchase with manual account allocation",
                  "value": {
                    "supplier_id": "afafcbec-9d94-4174-8d5c-ec8d72780947",
                    "voucher_type": 1,
                    "supplier_invoice_number": "0001-00000004",
                    "invoice_date": "2026-03-10",
                    "currency": "PES",
                    "subtotal": 100000,
                    "tax_amount": 21000,
                    "total": 121000,
                    "iva_breakdown": [
                      {
                        "tax_rate_id": 5,
                        "base_amount": 100000,
                        "tax_amount": 21000
                      }
                    ],
                    "manual_account_allocations": {
                      "gravado21": "550e8400-e29b-41d4-a716-446655440301"
                    }
                  }
                },
                "purchase_with_receipt": {
                  "summary": "Purchase invoice receiving stock",
                  "value": {
                    "supplier_id": "afafcbec-9d94-4174-8d5c-ec8d72780947",
                    "voucher_type": 1,
                    "supplier_invoice_number": "0001-00000002",
                    "invoice_date": "2026-03-10",
                    "currency": "PES",
                    "exchange_rate": 1,
                    "products_received": true,
                    "warehouse_id": "550e8400-e29b-41d4-a716-446655440010",
                    "update_product_variant_cost": true,
                    "items": [
                      {
                        "product_id": "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
                        "quantity": 3,
                        "unit_cost": 8250,
                        "tax_rate_id": 5
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Compra creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseTransactionSuccessResponse"
                },
                "examples": {
                  "created": {
                    "summary": "Compra creada",
                    "value": {
                      "request_id": "req_purchase_commit_1",
                      "data": {
                        "purchase_id": "cf19b3ae-4c08-48be-b9d7-e6f2f5baf609",
                        "receipt_created": false,
                        "idempotent_replay": false,
                        "normalized_purchase": {
                          "supplier_id": "afafcbec-9d94-4174-8d5c-ec8d72780947",
                          "voucher_type": 1,
                          "supplier_invoice_number": "0001-00000001",
                          "invoice_date": "2026-03-10",
                          "account_date": null,
                          "due_date": null,
                          "payment_term_id": null,
                          "payment_term_days": null,
                          "import_document_role": null,
                          "import_source_purchase_id": null,
                          "import_nationalization_status": null,
                          "customs_dispatch_number": null,
                          "warehouse_id": null,
                          "products_received": false,
                          "products_returned": false,
                          "inventory_effect": "none",
                          "update_product_variant_cost": true,
                          "currency": "PES",
                          "exchange_rate": 1,
                          "subtotal": 8250,
                          "tax_amount": 1733,
                          "total": 9983,
                          "discount": 0,
                          "exempt_amount": 0,
                          "non_taxed_amount": null,
                          "base_amount": null,
                          "vat_perception_amount": null,
                          "national_tax_amount": null,
                          "gross_income_tax_amount": null,
                          "municipal_tax_amount": null,
                          "internal_tax_amount": null,
                          "other_tax_amount": null,
                          "notes": null,
                          "pdf_path": null,
                          "items": []
                        },
                        "projected_effects": {
                          "inventory": {
                            "will_receive_products": false,
                            "will_create_receipt": false,
                            "will_increase_direct_stock": false,
                            "will_return_products": false,
                            "will_decrease_direct_stock": false,
                            "inventory_effect": "none",
                            "warehouse_id": null,
                            "product_line_count": 1,
                            "total_quantity": 1,
                            "purchase_order_ids": []
                          },
                          "accounting": {
                            "will_create_journal_entry": true,
                            "currency": "PES",
                            "exchange_rate": 1
                          }
                        }
                      },
                      "warnings": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_purchase_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating purchases",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_purchase_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_purchase_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "IDEMPOTENCY_CONFLICT",
                    "value": {
                      "request_id": "req_purchase_1",
                      "error": {
                        "code": "IDEMPOTENCY_CONFLICT",
                        "message": "The same Idempotency-Key was already used with a different purchase.",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "412": {
            "description": "Business precondition not satisfied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "PRECONDITION_FAILED",
                    "value": {
                      "request_id": "req_purchase_1",
                      "error": {
                        "code": "PRECONDITION_FAILED",
                        "message": "The purchase could not be created because a business precondition failed.",
                        "retryable": false,
                        "details": [
                          {
                            "field": "input.items",
                            "code": "INVENTORY",
                            "message": "Stock insuficiente. Stock actual: -34, cambio solicitado: 1"
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_purchase_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the purchase transaction",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/webhook-event-types": {
      "get": {
        "summary": "Listar tipos de evento de webhook",
        "description": "Lista eventos suscribibles con el recurso, scopes de lectura y versiones de payload requeridos.",
        "operationId": "listApiWebhookEventTypes",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tipos de evento listados",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEventTypeListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope webhooks:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope webhooks:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst eventTypes = await lapyme.webhookEventTypes.list({ limit: 100 });\n"
          }
        ]
      }
    },
    "/api/v1/webhook-endpoints": {
      "get": {
        "summary": "Listar endpoints de webhook",
        "description": "Lista endpoints visibles para la credencial. Por defecto incluye activos y pausados, no deshabilitados.",
        "operationId": "listApiWebhookEndpoints",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum1c9cda998e"
            }
          },
          {
            "name": "owner_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum4b017f6476"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum09382f5041"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Endpoints listados",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope webhooks:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope webhooks:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:read"
        ]
      },
      "post": {
        "summary": "Crear endpoint de webhook",
        "description": "Crea un endpoint activo y devuelve su signing_secret una sola vez. Requiere los scopes de lectura de todos los eventos habilitados.",
        "operationId": "createApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiWebhookEndpointCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Endpoint creado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:write"
        ],
        "x-dynamic-scope-requirement": {
          "source": "body",
          "field": "enabled_events",
          "resolver": "webhook_event_catalog"
        },
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst endpoint = await lapyme.webhookEndpoints.create({\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    label: \"Tienda principal\",\n    url: \"https://integracion.example.com/lapyme/webhooks\",\n    enabledEvents: [\"order.created\", \"order.updated\"],\n    apiVersion: \"2026-06-29\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/webhook-endpoints/{webhook_endpoint_id}": {
      "get": {
        "summary": "Obtener endpoint de webhook",
        "description": "Devuelve un endpoint visible sin material secreto ni IDs internos de grants.",
        "operationId": "getApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "webhook_endpoint_id",
            "in": "path",
            "description": "ID del endpoint de webhook",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Endpoint obtenido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "ID inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "ID inválido",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope webhooks:read faltante",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope webhooks:read faltante",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Endpoint no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Endpoint no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:read"
        ]
      },
      "patch": {
        "summary": "Actualizar endpoint de webhook",
        "description": "Actualiza label, URL, eventos o versión. El status es de solo lectura y se cambia mediante acciones nombradas.",
        "operationId": "updateApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "webhook_endpoint_id",
            "in": "path",
            "description": "ID del endpoint de webhook",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiWebhookEndpointUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Endpoint actualizado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Endpoint no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Endpoint no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de estado o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de estado o idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:write"
        ],
        "x-dynamic-scope-requirement": {
          "source": "persisted_resource",
          "field": "resulting_enabled_events",
          "resolver": "webhook_event_catalog"
        }
      }
    },
    "/api/v1/webhook-endpoints/{webhook_endpoint_id}/pause": {
      "post": {
        "summary": "Pausar endpoint de webhook",
        "description": "Pausa un endpoint activo sin descartar sus entregas en cola.",
        "operationId": "pauseApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "webhook_endpoint_id",
            "in": "path",
            "description": "ID del endpoint de webhook",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operación de webhook aceptada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Endpoint no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Endpoint no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de estado o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de estado o idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:write"
        ]
      }
    },
    "/api/v1/webhook-endpoints/{webhook_endpoint_id}/resume": {
      "post": {
        "summary": "Reanudar endpoint de webhook",
        "description": "Reanuda un endpoint pausado después de revalidar los scopes de sus eventos persistidos.",
        "operationId": "resumeApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "webhook_endpoint_id",
            "in": "path",
            "description": "ID del endpoint de webhook",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operación de webhook aceptada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Endpoint no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Endpoint no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de estado o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de estado o idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:write"
        ],
        "x-dynamic-scope-requirement": {
          "source": "persisted_resource",
          "field": "enabled_events",
          "resolver": "webhook_event_catalog"
        }
      }
    },
    "/api/v1/webhook-endpoints/{webhook_endpoint_id}/disable": {
      "post": {
        "summary": "Deshabilitar endpoint de webhook",
        "description": "Deshabilita permanentemente el endpoint y cancela entregas pendientes o reintentables.",
        "operationId": "disableApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "webhook_endpoint_id",
            "in": "path",
            "description": "ID del endpoint de webhook",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operación de webhook aceptada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Endpoint no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Endpoint no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de estado o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de estado o idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:write"
        ]
      }
    },
    "/api/v1/webhook-endpoints/{webhook_endpoint_id}/rotate-secret": {
      "post": {
        "summary": "Rotar secreto de webhook",
        "description": "Reemplaza el secreto inmediatamente y devuelve el nuevo signing_secret una sola vez.",
        "operationId": "rotateSecretApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "webhook_endpoint_id",
            "in": "path",
            "description": "ID del endpoint de webhook",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operación de webhook aceptada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookEndpointSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Endpoint no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Endpoint no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de estado o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de estado o idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst endpoint = await lapyme.webhookEndpoints.rotateSecret({\n  webhookEndpointId,\n  idempotencyKey: crypto.randomUUID(),\n});\n"
          }
        ]
      }
    },
    "/api/v1/webhook-endpoints/{webhook_endpoint_id}/test": {
      "post": {
        "summary": "Probar endpoint de webhook",
        "description": "Crea una entrega durable y sintética webhook.test para un endpoint activo o pausado.",
        "operationId": "testApiWebhookEndpoint",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "webhook_endpoint_id",
            "in": "path",
            "description": "ID del endpoint de webhook",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Operación de webhook aceptada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiWebhookTestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Endpoint no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Endpoint no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de estado o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de estado o idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "webhooks:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst test = await lapyme.webhookEndpoints.test({\n  webhookEndpointId,\n  idempotencyKey: crypto.randomUUID(),\n});\n"
          }
        ]
      }
    },
    "/api/v1/remitos": {
      "get": {
        "summary": "Listar remitos",
        "description": "Lista remitos de la organización. El orden estable es por creación descendente y luego ID descendente. No expone estados internos ni rutas de almacenamiento/PDF.",
        "operationId": "listApiRemitos",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "sale_id",
            "in": "query",
            "description": "Filtra remitos originados en una venta",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Filtra por cliente",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Busca por cliente o número de remito",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial del remito",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final del remito",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Remitos listados exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRemitoListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parametros invalidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parametros invalidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o invalida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o invalida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:read"
          ]
        ]
      }
    },
    "/api/v1/remitos/{remito_id}": {
      "get": {
        "summary": "Obtener remito por ID",
        "description": "Devuelve el detalle de un remito, incluyendo datos de documento, cliente, origen, punto de venta, entrega e items.",
        "operationId": "getApiRemitoById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "remito_id",
            "in": "path",
            "description": "ID del remito",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Remito obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRemitoDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parametros invalidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parametros invalidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o invalida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o invalida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Remito no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Remito no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:read"
          ]
        ]
      }
    },
    "/api/v1/sales": {
      "get": {
        "summary": "Listar ventas",
        "description": "Lista las ventas de la organización. Soporta filtros por cliente, fecha, estado, punto de venta, vendedor e integración.",
        "operationId": "listApiSales",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "description": "Comma-separated top-level sale sections to include. Omit for the endpoint default. List default: id, document, customer, amounts, reversesVoucher, integration, audit, tags. Detail default: id, document, customer, amounts, items, payments, applications, fiscal, reversesVoucher, integration, audit, tags.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnum84c92a5072"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por cliente, CUIT, número de comprobante, ID de integración, producto, SKU, código de barras o variante",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Filtra por cliente",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_attribute",
            "in": "query",
            "description": "Campo de fecha a usar para el filtro",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnume975a7c122"
            }
          },
          {
            "name": "integration_sources",
            "in": "query",
            "description": "Fuentes de integración. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "point_of_sale_ids",
            "in": "query",
            "description": "IDs de puntos de venta. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "register_ids",
            "in": "query",
            "description": "IDs de cajas. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "seller_ids",
            "in": "query",
            "description": "IDs de vendedores. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "invoice_statuses",
            "in": "query",
            "description": "Estados fiscales. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnum9ac70a3316"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "payment_statuses",
            "in": "query",
            "description": "Estados de cobranza. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "paid",
                  "owed"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "voucher_types",
            "in": "query",
            "description": "Tipos de comprobante. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "amount_attribute",
            "in": "query",
            "description": "Campo monetario a usar para min/max",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "total",
                "balance"
              ],
              "default": "balance"
            }
          },
          {
            "name": "min_amount",
            "in": "query",
            "description": "Importe mínimo en centavos",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "max_amount",
            "in": "query",
            "description": "Importe máximo en centavos",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ventas obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSaleListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_sales_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing sales",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_sales_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_sales_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_sales_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list sales",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst sales = await lapyme.sales.list({\n  limit: 20,\n  dateFrom: new Date(\"2026-03-01\"),\n  dateTo: new Date(\"2026-03-31\"),\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear venta",
        "description": "Registra una venta y devuelve sus efectos fiscales, de stock, pagos y contabilidad. Enviá Lapyme-Version: 2026-08-20 para usar el contrato estricto: total es obligatorio, unit_price es neto para comprobantes A y final para comprobantes a consumidor final, y los importes derivados se calculan una sola vez. Omitir el header conserva el contrato histórico de forma deprecada. Idempotency-Key solo protege reintentos; si necesitás guardar una referencia externa visible, enviá integration_source e integration_id en el cuerpo.",
        "operationId": "createApiSale",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Lapyme-Version",
            "in": "header",
            "description": "Versión fechada del contrato de creación de ventas. Usá 2026-08-20 en integraciones nuevas. Omitirla activa el comportamiento histórico deprecado.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar la misma creación de venta.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSaleTransactionRequest"
              },
              "examples": {
                "product_invoice_a_net_price": {
                  "summary": "Producto con comprobante A e importe neto",
                  "value": {
                    "customer_id": "550e8400-e29b-41d4-a716-446655440101",
                    "voucher_type": 1,
                    "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
                    "invoice_date": "2026-08-21",
                    "currency": "PES",
                    "items": [
                      {
                        "product_id": "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
                        "warehouse_id": "550e8400-e29b-41d4-a716-446655440010",
                        "quantity": 1,
                        "unit_price": 10000,
                        "tax_rate_id": 5
                      }
                    ],
                    "total": 12100
                  }
                },
                "custom_invoice_a_net_price": {
                  "summary": "Renglón libre con comprobante A e importe neto",
                  "value": {
                    "customer_id": "550e8400-e29b-41d4-a716-446655440101",
                    "voucher_type": 1,
                    "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
                    "invoice_date": "2026-08-21",
                    "currency": "PES",
                    "items": [
                      {
                        "name": "Servicio técnico",
                        "product_type": "service",
                        "quantity": 1,
                        "unit_price": 10000,
                        "tax_rate_id": 5
                      }
                    ],
                    "total": 12100
                  }
                },
                "product_invoice_b_final_price": {
                  "summary": "Producto con comprobante B e importe final",
                  "value": {
                    "voucher_type": 6,
                    "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
                    "invoice_date": "2026-08-21",
                    "currency": "PES",
                    "items": [
                      {
                        "product_id": "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
                        "warehouse_id": "550e8400-e29b-41d4-a716-446655440010",
                        "quantity": 1,
                        "unit_price": 12100,
                        "tax_rate_id": 5
                      }
                    ],
                    "total": 12100
                  }
                },
                "total_mismatch": {
                  "summary": "Total declarado que no coincide",
                  "value": {
                    "customer_id": "550e8400-e29b-41d4-a716-446655440101",
                    "voucher_type": 1,
                    "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
                    "invoice_date": "2026-08-21",
                    "currency": "PES",
                    "items": [
                      {
                        "name": "Servicio técnico",
                        "product_type": "service",
                        "quantity": 1,
                        "unit_price": 10000,
                        "tax_rate_id": 5
                      }
                    ],
                    "total": 10000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Venta creada exitosamente",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSaleTransactionSuccessResponse"
                },
                "examples": {
                  "created": {
                    "summary": "Venta creada",
                    "value": {
                      "request_id": "req_sale_commit_1",
                      "data": {
                        "sale": {
                          "sale_id": "cf19b3ae-4c08-48be-b9d7-e6f2f5baf609",
                          "customer_id": null,
                          "voucher_type": "90",
                          "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
                          "invoice_number": 84,
                          "formatted_invoice_number": "PRES-00001-00000084",
                          "invoice_status": "not_required",
                          "invoice_date": "2026-04-18",
                          "due_date": "2026-04-18",
                          "currency": "PES",
                          "subtotal": 8264,
                          "tax_amount": 1736,
                          "total": 10000,
                          "exempt_amount": 0,
                          "non_taxed_amount": 0,
                          "tributes_amount": 0,
                          "discount_amount": 0,
                          "balance": 10000,
                          "created_at": "2026-04-18T12:00:00.000Z"
                        },
                        "normalized_sale": {
                          "customer_id": null,
                          "customer_tax_category_override": null,
                          "voucher_type": 90,
                          "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
                          "register_id": null,
                          "operator_id": null,
                          "invoice_date": "2026-04-18",
                          "due_date": "2026-04-18",
                          "service_from": null,
                          "service_to": null,
                          "currency": "PES",
                          "exchange_rate": null,
                          "same_currency_payment": false,
                          "notes": null,
                          "subtotal": 8264,
                          "tax_amount": 1736,
                          "total": 10000,
                          "exempt_amount": 0,
                          "non_taxed_amount": 0,
                          "tributes_amount": 0,
                          "national_perception_amount": 0,
                          "gross_income_perception_amount": 0,
                          "gross_income_tax_breakdown": [],
                          "municipal_perception_amount": 0,
                          "internal_tribute_amount": 0,
                          "uncategorized_vat_perception_amount": 0,
                          "other_tribute_amount": 0,
                          "discount_type": null,
                          "discount_value": null,
                          "discount_amount": 0,
                          "balance": 10000,
                          "is_full_amount_pending": false,
                          "items": [
                            {
                              "product_id": null,
                              "product_name": null,
                              "sku": null,
                              "warehouse_id": null,
                              "name": "Technical service",
                              "product_type": "service",
                              "quantity": 1,
                              "unit_price": 10000,
                              "unit_cost": null,
                              "tax_rate_id": 5,
                              "is_exempt": false,
                              "discount": null,
                              "notes": null,
                              "account_id": null,
                              "cost_center1_id": null,
                              "cost_center2_id": null,
                              "cost_center3_id": null
                            }
                          ],
                          "payment_methods": []
                        },
                        "projected_effects": {
                          "inventory": {
                            "will_affect_stock": false,
                            "warehouse_ids": [],
                            "product_line_count": 0,
                            "total_quantity": 0
                          },
                          "accounting": {
                            "will_create_sale_entry": true,
                            "will_create_payment_entry": false
                          },
                          "fiscal": {
                            "invoice_status": "not_required"
                          },
                          "payments": {
                            "will_create_payments": false,
                            "payment_method_count": 0,
                            "total_amount": 0,
                            "pending_amount": 10000
                          }
                        },
                        "idempotent_replay": false
                      },
                      "warnings": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_sale_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating sales",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_sale_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_sale_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "IDEMPOTENCY_CONFLICT",
                    "value": {
                      "request_id": "req_sale_1",
                      "error": {
                        "code": "IDEMPOTENCY_CONFLICT",
                        "message": "The same Idempotency-Key was already used with a different sale.",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "412": {
            "description": "Business precondition not satisfied",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "PRECONDITION_FAILED",
                    "value": {
                      "request_id": "req_sale_1",
                      "error": {
                        "code": "PRECONDITION_FAILED",
                        "message": "The sale could not be created because a business precondition failed.",
                        "retryable": false,
                        "details": [
                          {
                            "field": "input.payment_methods",
                            "code": "VALIDATION",
                            "message": "You cannot send payment_methods when is_full_amount_pending=true"
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "El total declarado no coincide con el total calculado por La Pyme",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "BUSINESS_REQUIREMENT_UNMET",
                    "value": {
                      "request_id": "req_sale_total_mismatch_1",
                      "error": {
                        "type": "business_error",
                        "code": "BUSINESS_REQUIREMENT_UNMET",
                        "message": "The declared total does not match the calculated total.",
                        "retryable": false,
                        "details": [
                          {
                            "field": "input.total",
                            "code": "TOTAL_MISMATCH",
                            "message": "The declared total does not match the calculated total.",
                            "metadata": {
                              "expected": 12100,
                              "received": 10000
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "headers": {
              "Lapyme-Version": {
                "description": "Contrato fechado aplicado a la creación. Se devuelve cuando la solicitud envía una versión soportada.",
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedEnumf007ccd7a1"
                }
              },
              "Deprecation": {
                "description": "Fecha de deprecación del contrato histórico. Se devuelve cuando la solicitud omite Lapyme-Version.",
                "schema": {
                  "type": "string",
                  "example": "@1787184000"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_sale_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the sale transaction",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:write"
        ]
      }
    },
    "/api/v1/stock-transfers": {
      "get": {
        "summary": "Listar transferencias de stock",
        "description": "Lista las transferencias de stock de la organización con filtros por fecha, estado y depósitos.",
        "operationId": "listApiStockTransfers",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nota, producto, SKU o variante",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "description": "Estados de la transferencia. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnum736f0d077b"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "source_warehouse_id",
            "in": "query",
            "description": "Depósito de origen",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "target_warehouse_id",
            "in": "query",
            "description": "Depósito de destino",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transferencias obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTransferListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_transfers_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing stock transfers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_transfers_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_transfers_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_transfers_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list stock transfers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "transfers:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst transfers = await lapyme.stockTransfers.listStockTransfers({\n  limit: 20,\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear transferencia de stock",
        "description": "Crea una transferencia para mover productos entre depósitos.",
        "operationId": "createApiStockTransfer",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave opcional para deduplicar reintentos de la misma creación de transferencia. Si se omite, no hay protección automática contra repeticiones.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiStockTransferRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transferencia creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiStockTransferSuccessResponse"
                },
                "examples": {
                  "created": {
                    "summary": "Transferencia creada",
                    "value": {
                      "request_id": "req_transfer_commit_1",
                      "data": {
                        "transfer": {
                          "id": "cf19b3ae-4c08-48be-b9d7-e6f2f5baf609",
                          "organization_id": "550e8400-e29b-41d4-a716-446655440001",
                          "source_warehouse_id": "550e8400-e29b-41d4-a716-446655440010",
                          "target_warehouse_id": "550e8400-e29b-41d4-a716-446655440011",
                          "transfer_date": "2026-04-18T13:00:00.000Z",
                          "notes": "Storefront replenishment",
                          "status": "in_transit",
                          "created_at": "2026-04-18T13:00:00.000Z",
                          "updated_at": "2026-04-18T13:05:00.000Z",
                          "created_by": "550e8400-e29b-41d4-a716-446655440020",
                          "updated_by": "550e8400-e29b-41d4-a716-446655440020",
                          "source_warehouse": {
                            "id": "550e8400-e29b-41d4-a716-446655440010",
                            "name": "Central warehouse"
                          },
                          "target_warehouse": {
                            "id": "550e8400-e29b-41d4-a716-446655440011",
                            "name": "Showroom"
                          },
                          "items": [
                            {
                              "id": "550e8400-e29b-41d4-a716-446655440030",
                              "product_id": "550e8400-e29b-41d4-a716-446655440040",
                              "quantity": 5,
                              "received_quantity": 0,
                              "rejected_quantity": 0,
                              "product": {
                                "id": "550e8400-e29b-41d4-a716-446655440040",
                                "name": "Cable HDMI 2m",
                                "sku": "HDMI-2M",
                                "variant_options": null,
                                "option_names": []
                              }
                            }
                          ]
                        },
                        "idempotent_replay": false
                      },
                      "warnings": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Payload inválido o validación de negocio fallida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "VALIDATION_ERROR",
                    "value": {
                      "request_id": "req_transfer_1",
                      "error": {
                        "code": "VALIDATION_ERROR",
                        "message": "Source and target warehouses must be different",
                        "retryable": false,
                        "details": [
                          {
                            "field": "source_warehouse_id",
                            "code": "VALIDATION",
                            "message": "The source warehouse must be different from the target warehouse."
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_transfer_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_transfer_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Recurso relacionado inexistente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_transfer_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Transfer not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de stock o de idempotencia cuando se reutiliza una clave distinta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_transfer_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "Stock insuficiente para transferir 5 unidades.",
                        "retryable": false,
                        "details": [
                          {
                            "field": "items",
                            "code": "CONFLICT",
                            "message": "Stock insuficiente para transferir 5 unidades."
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_transfer_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the stock transfer",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "transfers:write"
        ]
      }
    },
    "/api/v1/reports/query": {
      "post": {
        "summary": "Consultar reporte",
        "description": "Ejecuta una consulta analítica agrupada sobre ventas, compras, pagos o inventario. El campo `source` determina qué dimensiones y métricas están disponibles.",
        "operationId": "queryApiReport",
        "tags": [
          "API"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              },
              "examples": {
                "sales_by_product": {
                  "summary": "Ventas por producto en Q1 2026",
                  "value": {
                    "source": "sales",
                    "period": {
                      "start_date": "2026-01-01",
                      "end_date": "2026-03-31"
                    },
                    "dimensions": [
                      "product"
                    ],
                    "measures": [
                      "total",
                      "units",
                      "count"
                    ],
                    "include_totals": true
                  }
                },
                "purchases_by_supplier": {
                  "summary": "Compras por proveedor en marzo de 2026",
                  "value": {
                    "source": "purchases",
                    "period": {
                      "start_date": "2026-03-01",
                      "end_date": "2026-03-31"
                    },
                    "dimensions": [
                      "supplier"
                    ],
                    "measures": [
                      "purchase_total",
                      "purchase_count"
                    ]
                  }
                },
                "payments_by_method": {
                  "summary": "Cobros y pagos por método en marzo de 2026",
                  "value": {
                    "source": "payments",
                    "period": {
                      "start_date": "2026-03-01",
                      "end_date": "2026-03-31"
                    },
                    "dimensions": [
                      "payment_method"
                    ],
                    "measures": [
                      "payment_net_cashflow",
                      "payment_collected_total",
                      "payment_paid_total"
                    ]
                  }
                },
                "inventory_snapshot": {
                  "summary": "Inventario final por producto",
                  "value": {
                    "source": "inventory",
                    "period": {
                      "start_date": "2026-03-01",
                      "end_date": "2026-03-31"
                    },
                    "dimensions": [
                      "product",
                      "warehouse"
                    ],
                    "measures": [
                      "ending_inventory_units",
                      "ending_inventory_value"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reporte ejecutado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportQueryResponse"
                },
                "examples": {
                  "sales_example": {
                    "summary": "Ventas por producto",
                    "value": {
                      "request_id": "req_report_1",
                      "data": {
                        "rows": [
                          {
                            "id": "9c692e8b",
                            "ids": [
                              "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae"
                            ],
                            "labels": [
                              "Almohada Microfibra 80x50"
                            ],
                            "measures": {
                              "total": 998300,
                              "units": 12,
                              "count": 8
                            }
                          },
                          {
                            "id": "3b4a1c2d",
                            "ids": [
                              "3b4a1c2d-1234-5678-abcd-ef1234567890"
                            ],
                            "labels": [
                              "King size sheet"
                            ],
                            "measures": {
                              "total": 450000,
                              "units": 5,
                              "count": 4
                            }
                          }
                        ],
                        "totals": {
                          "total": 1448300,
                          "units": 17,
                          "count": 12
                        },
                        "metadata": {
                          "source": "sales",
                          "dimensions": [
                            "product"
                          ],
                          "measures": [
                            "total",
                            "units",
                            "count"
                          ],
                          "period": {
                            "start_date": "2026-01-01",
                            "end_date": "2026-03-31"
                          },
                          "date_basis": "commercial"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_report_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for querying reports",
                        "retryable": false,
                        "details": [
                          {
                            "field": "measures",
                            "code": "too_small",
                            "message": "Select at least one measure"
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_report_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_report_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_report_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not run the report query",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "reports:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst report = await lapyme.reports.query({\n  source: \"sales\",\n  period: {\n    startDate: \"2026-01-01\",\n    endDate: \"2026-03-31\",\n  },\n  dimensions: [\"product\"],\n  measures: [\"total\", \"units\", \"count\"],\n  includeTotals: true,\n});\n"
          }
        ]
      }
    },
    "/api/v1/purchases/{purchase_id}": {
      "get": {
        "summary": "Obtener compra por ID",
        "description": "Devuelve el detalle de la compra.",
        "operationId": "getApiPurchaseById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_id",
            "in": "path",
            "description": "ID de la compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compra obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_purchase_detail_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_purchase_detail_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_purchase_detail_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Purchase not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_purchase_detail_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not retrieve the purchase",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst purchase = await lapyme.purchases.getPurchaseById({\n  purchaseId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "put": {
        "summary": "Actualizar compra",
        "description": "Actualiza una compra existente y devuelve el detalle persistido. El campo items es requerido y reemplaza los renglones de la compra. Requiere Idempotency-Key.",
        "operationId": "updateApiPurchase",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_id",
            "in": "path",
            "description": "ID de la compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPurchaseUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Compra actualizada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "412": {
            "description": "Precondición de negocio no satisfecha",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Precondición de negocio no satisfecha",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      },
      "delete": {
        "summary": "Eliminar compra",
        "description": "Elimina una compra existente. Puede revertir stock directo con undo_stock=true. Requiere Idempotency-Key.",
        "operationId": "deleteApiPurchase",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_id",
            "in": "path",
            "description": "ID de la compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "undo_stock",
            "in": "query",
            "description": "Si es true, revierte los movimientos de stock directo creados por la compra cuando sea posible.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compra eliminada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "La compra no puede eliminarse en su estado actual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "La compra no puede eliminarse en su estado actual",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "412": {
            "description": "No se pudo revertir stock por precondición de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "No se pudo revertir stock por precondición de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/purchase-orders": {
      "get": {
        "summary": "Listar órdenes de compra",
        "description": "Lista las órdenes de compra de la organización. Soporta búsqueda por proveedor o número de orden y filtros por fecha y estado.",
        "operationId": "listApiPurchaseOrders",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por proveedor o número de orden",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial de la orden",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final de la orden",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Estado o lista de estados separados por coma: draft, sent, partially_received, received, closed, cancelled",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumf2073aa092"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Órdenes de compra obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst purchaseOrders = await lapyme.purchaseOrders.listPurchaseOrders({\n  limit: 20,\n  status: \"draft\",\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear orden de compra",
        "description": "Crea una orden de compra en borrador. Requiere Idempotency-Key.",
        "operationId": "createApiPurchaseOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPurchaseOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Orden de compra creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/purchase-orders/{purchase_order_id}": {
      "get": {
        "summary": "Obtener orden de compra por ID",
        "description": "Devuelve el detalle de una orden de compra.",
        "operationId": "getApiPurchaseOrderById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_order_id",
            "in": "path",
            "description": "ID de la orden de compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orden de compra obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst purchaseOrder = await lapyme.purchaseOrders.getPurchaseOrderById({\n  purchaseOrderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "put": {
        "summary": "Actualizar orden de compra",
        "description": "Actualiza una orden de compra editable y devuelve el detalle persistido. Requiere Idempotency-Key.",
        "operationId": "updateApiPurchaseOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_order_id",
            "in": "path",
            "description": "ID de la orden de compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPurchaseOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Orden de compra actualizada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      },
      "delete": {
        "summary": "Eliminar orden de compra en borrador",
        "description": "Elimina una orden de compra solo si todavía está en estado borrador.",
        "operationId": "deleteApiDraftPurchaseOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_order_id",
            "in": "path",
            "description": "ID de la orden de compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orden de compra eliminada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/purchase-orders/{purchase_order_id}/confirm": {
      "post": {
        "summary": "Confirmar orden de compra",
        "description": "Confirma una orden de compra y devuelve el detalle persistido.",
        "operationId": "confirmApiPurchaseOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_order_id",
            "in": "path",
            "description": "ID de la orden de compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orden de compra confirmada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst purchaseOrder = await lapyme.purchaseOrders.confirm({\n  purchaseOrderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      }
    },
    "/api/v1/purchase-orders/{purchase_order_id}/close": {
      "post": {
        "summary": "Cerrar orden de compra",
        "description": "Cierra una orden de compra y devuelve el detalle persistido.",
        "operationId": "closeApiPurchaseOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_order_id",
            "in": "path",
            "description": "ID de la orden de compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orden de compra cerrada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/purchase-orders/{purchase_order_id}/reopen": {
      "post": {
        "summary": "Reabrir orden de compra",
        "description": "Reabre una orden de compra cerrada y devuelve el detalle persistido.",
        "operationId": "reopenApiPurchaseOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_order_id",
            "in": "path",
            "description": "ID de la orden de compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orden de compra reabierta exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/purchase-orders/{purchase_order_id}/receipts": {
      "post": {
        "summary": "Recibir orden de compra",
        "description": "Registra la recepción de líneas de una orden de compra confirmada. Requiere Idempotency-Key.",
        "operationId": "receiveApiPurchaseOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_order_id",
            "in": "path",
            "description": "ID de la orden de compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPurchaseOrderReceiptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recepción creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPurchaseOrderReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Orden de compra no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Orden de compra no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/orders": {
      "get": {
        "summary": "Listar pedidos",
        "description": "Lista pedidos de comercio con paginación por cursor. No expone page, offset, total ni total_pages.",
        "operationId": "listApiOrders",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum4ac9200c4a"
            }
          },
          {
            "name": "preparation_status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumb49e56b125"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pedidos obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:read"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst orders = await lapyme.orders.listOrders({\n  limit: 20,\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear pedido",
        "description": "Crea un pedido de comercio y su trabajo inicial de preparación. Requiere Idempotency-Key.",
        "operationId": "createApiOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pedido creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ]
      }
    },
    "/api/v1/orders/{order_id}": {
      "get": {
        "summary": "Obtener pedido",
        "description": "Devuelve el detalle persistido de un pedido de comercio.",
        "operationId": "getApiOrderById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pedido obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:read"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst order = await lapyme.orders.getOrderById({\n  orderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "patch": {
        "summary": "Actualizar notas del pedido",
        "description": "Actualiza las notas del pedido sin modificar importes, líneas ni estados.",
        "operationId": "patchApiOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notes": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pedido actualizado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst order = await lapyme.orders.updateOrderNotes({\n  orderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  body: {\n    notes: \"Retira por sucursal.\",\n  },\n});\n"
          }
        ]
      },
      "delete": {
        "summary": "Eliminar pedido archivado",
        "description": "Elimina únicamente pedidos archivados; la validación de estado vive en la capability de commerce.",
        "operationId": "deleteApiArchivedOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pedido archivado eliminado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ]
      }
    },
    "/api/v1/orders/{order_id}/archive": {
      "post": {
        "summary": "Archivar pedido",
        "description": "Archiva un pedido elegible y permite registrar un motivo opcional sin modificar sus líneas ni importes.",
        "operationId": "archiveApiOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrderOptionalReasonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pedido archivado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst order = await lapyme.orders.archive({\n  orderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      }
    },
    "/api/v1/orders/{order_id}/cancel": {
      "post": {
        "summary": "Cancelar pedido",
        "description": "Cancela un pedido elegible y devuelve el estado persistido después de aplicar sus efectos de cancelación.",
        "operationId": "cancelApiOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pedido cancelado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst order = await lapyme.orders.cancel({\n  orderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      }
    },
    "/api/v1/orders/{order_id}/preparation": {
      "patch": {
        "summary": "Actualizar preparación pendiente",
        "description": "Marca el pedido como en preparación o cambia el depósito de unidades pendientes.",
        "operationId": "updateApiOrderPreparation",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrderPreparationUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preparación pendiente actualizada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst order = await lapyme.orders.updatePreparation({\n  orderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  body: {\n    status: \"in_progress\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/orders/{order_id}/unarchive": {
      "post": {
        "summary": "Desarchivar pedido",
        "description": "Restaura un pedido archivado y devuelve el estado persistido resultante.",
        "operationId": "unarchiveApiOrder",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pedido desarchivado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ]
      }
    },
    "/api/v1/orders/{order_id}/preparations": {
      "post": {
        "summary": "Marcar líneas como preparadas",
        "description": "Crea una preparación de líneas del pedido y requiere Idempotency-Key.",
        "operationId": "createApiOrderPreparation",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrderPreparationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preparación creada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst order = await lapyme.orders.createPreparation({\n  orderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    items: [\n      {\n        orderLineId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n        quantity: 1,\n      },\n    ],\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/orders/{order_id}/preparations/{preparation_id}/cancel": {
      "post": {
        "summary": "Cancelar preparación",
        "description": "Cancela una preparación existente del pedido y permite registrar un motivo opcional.",
        "operationId": "cancelApiOrderPreparation",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "preparation_id",
            "in": "path",
            "description": "ID de la preparación",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrderOptionalReasonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preparación cancelada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ]
      }
    },
    "/api/v1/purchases/{purchase_id}/document": {
      "get": {
        "summary": "Descargar documento de compra",
        "description": "Revalida la API key, el scope purchases:read, la organización y la procedencia del documento. Responde 302 hacia una URL firmada de cinco minutos para el PDF o imagen original. Seguí el redirect y no persistas el Location.",
        "operationId": "downloadApiPurchaseDocument",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "purchase_id",
            "in": "path",
            "description": "ID de la compra",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Authorized redirect to a short-lived signed storage URL. Clients should follow redirects immediately and must not persist the Location value.",
            "headers": {
              "Location": {
                "description": "Short-lived signed URL for the document bytes.",
                "required": true,
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "Always private, no-store.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support and tracing.",
                "schema": {
                  "type": "string",
                  "example": "req_document_1"
                }
              },
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            }
          },
          "400": {
            "description": "ID de recurso inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "ID de recurso inválido",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Recurso o documento no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Recurso o documento no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno al validar la procedencia segura del documento",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno al validar la procedencia segura del documento",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "No se pudo firmar el documento temporalmente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RETRYABLE_DEPENDENCY_FAILURE",
                    "value": {
                      "request_id": "req_document_1",
                      "error": {
                        "code": "RETRYABLE_DEPENDENCY_FAILURE",
                        "message": "Document storage is temporarily unavailable.",
                        "retryable": true,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst response = await fetch(\n  \"https://api.lapyme.com.ar/api/v1/purchases/9c692e8b-0f9a-4f7c-8b99-061a2eb188ae/document\",\n  {\n    headers: { Authorization: `Bearer ${process.env[\"LAPYME_API_KEY\"]}` },\n    redirect: \"follow\",\n  }\n);\nif (!response.ok) throw new Error(await response.text());\nconst documentBytes = await response.arrayBuffer();\n"
          }
        ]
      }
    },
    "/api/v1/orders/{order_id}/invoices": {
      "post": {
        "summary": "Facturar pedido",
        "description": "Factura líneas del pedido y requiere Idempotency-Key.",
        "operationId": "createApiOrderInvoice",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "ID del pedido",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrderInvoiceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pedido facturado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "orders:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst order = await lapyme.orders.createInvoice({\n  orderId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    voucherType: 6,\n    pointOfSaleId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n    invoiceDate: \"2026-05-26\",\n    lines: [\n      {\n        orderLineId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n        quantityToInvoice: 1,\n      },\n    ],\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/sales/{sale_id}": {
      "get": {
        "summary": "Obtener venta por ID",
        "description": "Devuelve el detalle de la venta.",
        "operationId": "getApiSaleById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "sale_id",
            "in": "path",
            "description": "ID de la venta",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Comma-separated top-level sale sections to include. Omit for the endpoint default. List default: id, document, customer, amounts, reversesVoucher, integration, audit, tags. Detail default: id, document, customer, amounts, items, payments, applications, fiscal, reversesVoucher, integration, audit, tags.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnum84c92a5072"
              }
            },
            "style": "form",
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "Venta obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSaleDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_sale_detail_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_sale_detail_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Venta no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_sale_detail_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Sale not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_sale_detail_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not retrieve the sale",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst sale = await lapyme.sales.getSaleById({\n  saleId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "patch": {
        "summary": "Actualizar metadatos de venta",
        "description": "Actualiza solo metadatos operativos de una venta: notas, referencia de integracion externa y vendedor. No permite modificar items, importes, pagos ni datos fiscales.",
        "operationId": "patchApiSaleMetadata",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "sale_id",
            "in": "path",
            "description": "ID de la venta",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSaleMetadataPatchRequest"
              },
              "examples": {
                "update_notes_and_reference": {
                  "summary": "Actualizar notas y referencia externa",
                  "value": {
                    "notes": "Pedido conciliado con ERP",
                    "integration_source": "ERP",
                    "integration_id": "SO-10045"
                  }
                },
                "clear_external_reference": {
                  "summary": "Limpiar referencia externa",
                  "value": {
                    "integration_source": null,
                    "integration_id": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Venta actualizada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSaleDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Payload invalido o metadatos no permitidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_sale_patch_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for updating the sale",
                        "retryable": false,
                        "details": [
                          {
                            "field": "integration_id",
                            "code": "custom",
                            "message": "integration_source and integration_id must be provided together."
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o invalida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_sale_patch_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_sale_patch_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Venta no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_sale_patch_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Sale not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "La referencia de integracion ya esta asociada a otra venta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_sale_patch_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "Sale integration reference already exists.",
                        "retryable": false,
                        "details": [
                          {
                            "field": "integration_id",
                            "code": "duplicate_integration_reference",
                            "message": "Another sale already uses this integration source and ID."
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_sale_patch_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not update the sale",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst sale = await lapyme.sales.patchMetadata({\n  saleId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  body: {\n    notes: \"Referencia actualizada desde integracion\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/stock-transfers/{transfer_id}": {
      "get": {
        "summary": "Obtener transferencia por ID",
        "description": "Devuelve el detalle de la transferencia de stock.",
        "operationId": "getApiStockTransferById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "transfer_id",
            "in": "path",
            "description": "ID de la transferencia",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transferencia obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTransferDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_transfer_detail_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_transfer_detail_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Transferencia no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_transfer_detail_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Transferencia no encontrada",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_transfer_detail_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not retrieve the transfer",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "transfers:read"
        ]
      }
    },
    "/api/v1/stock-movements": {
      "post": {
        "summary": "Crear movimiento de stock",
        "description": "Registra un movimiento manual para ajustar stock de un producto o variante.",
        "operationId": "createApiStockMovement",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar el mismo movimiento de stock.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiStockMovementRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Movimiento de stock creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiStockMovementResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_stock_movement_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating stock movements",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_stock_movement_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_stock_movement_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Recurso relacionado inexistente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_stock_movement_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Warehouse not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "IDEMPOTENCY_CONFLICT",
                    "value": {
                      "request_id": "req_stock_movement_1",
                      "error": {
                        "code": "IDEMPOTENCY_CONFLICT",
                        "message": "The same Idempotency-Key was already used with a different stock movement.",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_stock_movement_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the stock movement",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "inventory:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "products:write"
          ]
        ]
      }
    },
    "/api/v1/customers": {
      "get": {
        "summary": "Listar clientes",
        "description": "Devuelve clientes de la organización. Permite buscar por nombre, CUIT o email.",
        "operationId": "listApiCustomers",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre, CUIT o email",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "description": "Filtra por estado activo",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Estado lógico del cliente. Puede repetirse o enviarse separado por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnumd952d5ce8e"
              }
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Clientes obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_customers_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing customers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_customers_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_customers_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_customers_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list customers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst customers = await lapyme.customers.get({\n  limit: 20,\n  query: \"Acme\",\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear cliente",
        "description": "Crea un cliente para ventas, cuentas corrientes, etiquetas y reportes.",
        "operationId": "createApiCustomer",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar la misma creación de cliente.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cliente creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_customer_create_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating customers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_customer_create_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_customer_create_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Recurso relacionado inexistente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_customer_create_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Default price list not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_customer_create_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A customer with this document number already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_customer_create_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not process the customer",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst customer = await lapyme.customers.create({\n  idempotencyKey: crypto.randomUUID(),\n  body: {\n    name: \"Acme S.A.\",\n    taxId: \"30711222333\",\n    email: \"compras@acme.com.ar\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/customers/{customer_id}": {
      "get": {
        "summary": "Obtener cliente por ID",
        "description": "Devuelve los datos del cliente.",
        "operationId": "getApiCustomerById",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "description": "ID del cliente",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cliente obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetro inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_customer_detail_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for retrieving the customer",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_customer_detail_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_customer_detail_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cliente no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_customer_detail_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Customer not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_customer_detail_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not retrieve the customer",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst customer = await lapyme.customers.getCustomerById({\n  customerId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      },
      "put": {
        "summary": "Actualizar cliente",
        "description": "Actualiza un cliente y devuelve los datos persistidos.",
        "operationId": "updateApiCustomer",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "description": "ID del cliente",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cliente actualizado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_customer_update_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for updating customers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_customer_update_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_customer_update_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cliente o recurso relacionado inexistente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_customer_update_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Customer not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_customer_update_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A customer with this document number already exists",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_customer_update_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not update the customer",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:write"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst customer = await lapyme.customers.updateCustomer({\n  customerId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  body: {\n    email: \"administracion@acme.com.ar\",\n  },\n});\n"
          }
        ]
      }
    },
    "/api/v1/tags": {
      "get": {
        "summary": "Listar etiquetas",
        "description": "Lista el catálogo de etiquetas para un scope específico. Puede incluir etiquetas archivadas.",
        "operationId": "listApiTags",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "description": "Scope del catálogo de etiquetas",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum09f8155a9a"
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Incluye etiquetas archivadas en la respuesta",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Etiquetas obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTagsListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_tags_list_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing tags",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_tags_list_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_tags_list_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_tags_list_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list tags",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [],
        "x-required-scopes-by-query": {
          "parameter": "scope",
          "values": {
            "customer": [
              "customers:read"
            ],
            "supplier": [
              "suppliers:read"
            ],
            "product": [
              "products:read"
            ],
            "sale": [
              "sales:read"
            ],
            "purchase": [
              "purchases:read"
            ],
            "purchase_order": [
              "purchases:read"
            ],
            "transfer": [
              "transfers:read"
            ]
          }
        }
      },
      "post": {
        "summary": "Crear etiqueta",
        "description": "Crea una etiqueta para clasificar clientes, proveedores, productos o ventas.",
        "operationId": "createApiTag",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave única para evitar duplicados al reintentar la misma creación de etiqueta.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTagCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etiqueta creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTagCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_tag_create_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for creating tags",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_tag_create_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_tag_create_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio o idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_tag_create_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A tag with this name already exists for this record type.",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_tag_create_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not create the tag",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "admin"
        ]
      }
    },
    "/api/v1/tags/{tag_id}": {
      "patch": {
        "summary": "Actualizar etiqueta",
        "description": "Renombra, actualiza metadatos o archiva/desarchiva una etiqueta existente.",
        "operationId": "updateApiTag",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "tag_id",
            "in": "path",
            "description": "ID de la etiqueta",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTagUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etiqueta actualizada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTagUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_tag_update_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for updating tags",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_tag_update_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_tag_update_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Etiqueta no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_tag_update_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Etiqueta no encontrada",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "CONFLICT",
                    "value": {
                      "request_id": "req_tag_update_1",
                      "error": {
                        "code": "CONFLICT",
                        "message": "A tag with this name already exists for this record type.",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_tag_update_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not update the tag",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "admin"
        ]
      }
    },
    "/api/v1/purchases/tags/apply": {
      "post": {
        "summary": "Aplicar etiquetas a compras",
        "description": "Agrega y/o remueve etiquetas de scope `purchase` en un lote de compras.",
        "operationId": "applyApiPurchaseTags",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiApplyTagsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etiquetas aplicadas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiApplyTagsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_purchase_tags_apply_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for applying tags to purchases",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_purchase_tags_apply_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_purchase_tags_apply_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_purchase_tags_apply_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not apply tags to purchases",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "purchases:write"
        ]
      }
    },
    "/api/v1/customers/tags/apply": {
      "post": {
        "summary": "Aplicar etiquetas a clientes",
        "description": "Agrega y/o remueve etiquetas de scope `customer` en un lote de clientes.",
        "operationId": "applyApiCustomerTags",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiApplyTagsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etiquetas aplicadas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiApplyTagsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_customer_tags_apply_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for applying tags to customers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_customer_tags_apply_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_customer_tags_apply_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_customer_tags_apply_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not apply tags to customers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:write"
        ]
      }
    },
    "/api/v1/suppliers/tags/apply": {
      "post": {
        "summary": "Aplicar etiquetas a proveedores",
        "description": "Agrega y/o remueve etiquetas de scope `supplier` en un lote de proveedores.",
        "operationId": "applyApiSupplierTags",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiApplyTagsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etiquetas aplicadas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiApplyTagsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_supplier_tags_apply_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for applying tags to suppliers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_supplier_tags_apply_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_supplier_tags_apply_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_supplier_tags_apply_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not apply tags to suppliers",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "suppliers:write"
        ]
      }
    },
    "/api/v1/products/tags/apply": {
      "post": {
        "summary": "Aplicar etiquetas a productos",
        "description": "Agrega y/o remueve etiquetas de scope `product` en un lote de productos.",
        "operationId": "applyApiProductTags",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiApplyTagsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etiquetas aplicadas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiApplyTagsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_product_tags_apply_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for applying tags to products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_product_tags_apply_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_product_tags_apply_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_product_tags_apply_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not apply tags to products",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "products:write"
        ]
      }
    },
    "/api/v1/sales/{sale_id}/document": {
      "get": {
        "summary": "Descargar comprobante de venta",
        "description": "Revalida la API key, el scope sales:read, la organización, el estado del PDF y su procedencia. Responde 302 hacia una URL firmada de cinco minutos. Seguí el redirect y no persistas el Location. Un PDF pendiente responde 409 retryable con Retry-After; uno fallido responde 409 no retryable.",
        "operationId": "downloadApiSaleDocument",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "sale_id",
            "in": "path",
            "description": "ID de la venta",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Authorized redirect to a short-lived signed storage URL. Clients should follow redirects immediately and must not persist the Location value.",
            "headers": {
              "Location": {
                "description": "Short-lived signed URL for the document bytes.",
                "required": true,
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "Always private, no-store.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support and tracing.",
                "schema": {
                  "type": "string",
                  "example": "req_document_1"
                }
              },
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            }
          },
          "400": {
            "description": "ID de recurso inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "ID de recurso inválido",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Recurso o documento no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Recurso o documento no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "El comprobante está pendiente o falló",
            "headers": {
              "Retry-After": {
                "description": "Presente con valor 5 solamente cuando el documento sigue pendiente.",
                "schema": {
                  "type": "string",
                  "example": "5"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "PRECONDITION_FAILED",
                    "value": {
                      "request_id": "req_sale_document_1",
                      "error": {
                        "code": "PRECONDITION_FAILED",
                        "message": "Sale document is not ready.",
                        "retryable": true,
                        "details": [
                          {
                            "field": "document",
                            "code": "document_pending",
                            "message": "The invoice document is still being generated."
                          }
                        ],
                        "type": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno al validar la procedencia segura del documento",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno al validar la procedencia segura del documento",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "No se pudo firmar el documento temporalmente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RETRYABLE_DEPENDENCY_FAILURE",
                    "value": {
                      "request_id": "req_document_1",
                      "error": {
                        "code": "RETRYABLE_DEPENDENCY_FAILURE",
                        "message": "Document storage is temporarily unavailable.",
                        "retryable": true,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst response = await fetch(\n  \"https://api.lapyme.com.ar/api/v1/sales/9c692e8b-0f9a-4f7c-8b99-061a2eb188ae/document\",\n  {\n    headers: { Authorization: `Bearer ${process.env[\"LAPYME_API_KEY\"]}` },\n    redirect: \"follow\",\n  }\n);\nif (!response.ok) throw new Error(await response.text());\nconst invoicePdf = await response.arrayBuffer();\n"
          }
        ]
      }
    },
    "/api/v1/sales/{sale_id}/returns": {
      "post": {
        "summary": "Crear nota de crédito por devolución",
        "description": "Crea una nota de crédito vinculada a una venta existente. Usá este endpoint cuando tenés un sale_id de La Pyme y querés devolver parcial o totalmente sus renglones.",
        "operationId": "createApiReturnCreditNote",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "sale_id",
            "in": "path",
            "description": "ID de la venta original",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "sale_item_id",
                        "quantity",
                        "unit_price"
                      ],
                      "properties": {
                        "sale_item_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "product_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "warehouse_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "quantity": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        },
                        "unit_price": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "discount_amount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "discount_percentage": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100
                        },
                        "subtotal": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "tax_amount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  },
                  "payment_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "refund_amounts_by_method": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "restock_inventory": {
                    "type": "boolean"
                  },
                  "integration_source": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "integration_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "auto_invoicing": {
                    "type": "boolean"
                  },
                  "skip_refund_payment": {
                    "type": "boolean"
                  },
                  "operator_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Nota de crédito creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedObject44d57fbeb2"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:write"
        ]
      }
    },
    "/api/v1/credit-notes": {
      "post": {
        "summary": "Crear nota de crédito independiente",
        "description": "Crea una nota de crédito independiente, asociada a un comprobante externo o a un período asociado explícitamente soportado. No usar para devoluciones de ventas internas: en ese caso usá /api/v1/sales/{sale_id}/returns.",
        "operationId": "createApiStandaloneCreditNote",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer_id",
                  "voucher_type",
                  "point_of_sale_id",
                  "issue_date",
                  "items"
                ],
                "properties": {
                  "customer_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "voucher_type": {
                    "type": "integer",
                    "enum": [
                      3,
                      8,
                      13,
                      53,
                      95,
                      100,
                      203,
                      208,
                      213
                    ],
                    "description": "AFIP credit-note voucher type."
                  },
                  "point_of_sale_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "register_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "operator_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "issue_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "cbtes_asoc": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "tipo": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "punto_venta": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "numero": {
                        "type": "integer",
                        "minimum": 1
                      }
                    }
                  },
                  "associated_period": {
                    "type": "object",
                    "description": "Associated service period. For fiscal credit notes, this can be used instead of cbtes_asoc.",
                    "properties": {
                      "desde": {
                        "type": "string",
                        "format": "date"
                      },
                      "hasta": {
                        "type": "string",
                        "format": "date"
                      }
                    }
                  },
                  "currency": {
                    "$ref": "#/components/schemas/ApiSharedEnum6cfb146157"
                  },
                  "cost_centers": {
                    "type": "object",
                    "properties": {
                      "cost_center_1_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "cost_center_2_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "cost_center_3_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  },
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "quantity",
                        "unit_price",
                        "tax_rate_id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "product_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "product_name": {
                          "type": "string"
                        },
                        "product_sku": {
                          "type": "string"
                        },
                        "product_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "product",
                            "combo",
                            "kit",
                            "service",
                            null
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "quantity": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        },
                        "unit_price": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "tax_rate_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "is_exempt": {
                          "type": "boolean",
                          "default": false
                        },
                        "discount_percentage": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "account_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "account_name": {
                          "type": "string"
                        },
                        "warehouse_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "cost_center_1_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "cost_center_2_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "cost_center_3_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        }
                      }
                    }
                  },
                  "restock_inventory": {
                    "type": "boolean",
                    "default": false
                  },
                  "warehouse_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Nota de crédito creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedObject44d57fbeb2"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pedido no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pedido no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o de negocio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o de negocio",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:write"
        ]
      }
    },
    "/api/v1/sales/tags/apply": {
      "post": {
        "summary": "Aplicar etiquetas a ventas",
        "description": "Agrega y/o remueve etiquetas de scope `sale` en un lote de ventas.",
        "operationId": "applyApiSaleTags",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "description": "ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiApplyTagsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etiquetas aplicadas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiApplyTagsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_sale_tags_apply_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid request for applying tags to sales",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_sale_tags_apply_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_sale_tags_apply_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_sale_tags_apply_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not apply tags to sales",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:write"
        ]
      }
    },
    "/api/v1/customer-payments": {
      "get": {
        "summary": "Listar cobranzas de clientes",
        "description": "Lista cobranzas de clientes con búsqueda, filtro por fecha, estado y paginación por cursor.",
        "operationId": "listApiCustomerPayments",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por cliente, número de cobranza o método de pago",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Estado de la cobranza",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum8ef2575a44"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial en formato YYYY-MM-DD",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final en formato YYYY-MM-DD",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cobranzas obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerPaymentListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_customer_payments_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid customer payments query parameters",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:read"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst payments = await lapyme.customerPayments.listCustomerPayments({\n  limit: 20,\n  dateFrom: new Date(\"2026-03-01\"),\n  dateTo: new Date(\"2026-03-31\"),\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear cobranza de cliente",
        "description": "Registra una cobranza de cliente con uno o más métodos de pago, aplicaciones a ventas o cuenta corriente, retenciones y datos de cheque cuando corresponde.",
        "operationId": "createApiCustomerPayment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCustomerPaymentCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cobranza creada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerPaymentCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_customer_payment_create_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid customer payment payload",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ]
      }
    },
    "/api/v1/customer-payments/{payment_id}": {
      "get": {
        "summary": "Obtener cobranza de cliente",
        "description": "Obtiene una cobranza de cliente por ID.",
        "operationId": "getApiCustomerPayment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cobranza obtenida exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerPaymentDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "ID inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "ID inválido",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cobranza no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Cobranza no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:read"
          ]
        ]
      }
    },
    "/api/v1/customer-payments/{payment_id}/void": {
      "post": {
        "summary": "Anular cobranza de cliente",
        "description": "Anula una cobranza de cliente existente por ID.",
        "operationId": "voidApiCustomerPayment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cobranza anulada exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCustomerPaymentVoidResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cobranza no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Cobranza no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "sales:write"
          ]
        ]
      }
    },
    "/api/v1/supplier-payments": {
      "get": {
        "summary": "Listar pagos a proveedores",
        "description": "Lista pagos a proveedores con búsqueda, filtro por fecha, estado y paginación por cursor.",
        "operationId": "listApiSupplierPayments",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por proveedor, número de pago o método de pago",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Estado del pago",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum8ef2575a44"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial en formato YYYY-MM-DD",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final en formato YYYY-MM-DD",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagos obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierPaymentListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "purchases:read"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst payments = await lapyme.supplierPayments.listSupplierPayments({\n  limit: 20,\n  dateFrom: new Date(\"2026-03-01\"),\n  dateTo: new Date(\"2026-03-31\"),\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear pago a proveedor",
        "description": "Registra un pago a proveedor con uno o más métodos de pago, aplicaciones a compras o cuenta corriente, retenciones y datos de cheque cuando corresponde.",
        "operationId": "createApiSupplierPayment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierPaymentCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pago creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierPaymentCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "purchases:write"
          ]
        ]
      }
    },
    "/api/v1/supplier-payments/{payment_id}": {
      "get": {
        "summary": "Obtener pago a proveedor",
        "description": "Obtiene un pago a proveedor por ID.",
        "operationId": "getApiSupplierPayment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pago obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierPaymentDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "ID inválido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "ID inválido",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pago no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pago no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "purchases:read"
          ]
        ]
      },
      "put": {
        "summary": "Actualizar pago a proveedor",
        "description": "Actualiza un pago a proveedor existente y devuelve el detalle persistido. Requiere Idempotency-Key.",
        "operationId": "updateApiSupplierPayment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSupplierPaymentUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pago actualizado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierPaymentUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pago no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pago no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "purchases:write"
          ]
        ]
      }
    },
    "/api/v1/supplier-payments/{payment_id}/void": {
      "post": {
        "summary": "Anular pago a proveedor",
        "description": "Anula un pago a proveedor existente por ID.",
        "operationId": "voidApiSupplierPayment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pago anulado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSupplierPaymentVoidResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pago no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Pago no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payments:write"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "purchases:write"
          ]
        ]
      }
    },
    "/api/v1/payment-methods": {
      "get": {
        "summary": "Listar métodos de pago",
        "description": "Lista los métodos de pago operativos para ventas. Devuelve solo métodos activos por defecto.",
        "operationId": "listApiPaymentMethods",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "description": "Filtra por estado activo. Si se omite, el endpoint usa true por defecto.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Métodos de pago obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPaymentMethodListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_payment_methods_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing payment methods",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_payment_methods_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_payment_methods_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_payment_methods_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list payment methods",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payment_methods:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst paymentMethods = await lapyme.paymentMethods.list({\n  limit: 20,\n});\n"
          }
        ]
      },
      "post": {
        "summary": "Crear método de pago",
        "description": "Crea un método de pago para registrar cobros y pagos.",
        "operationId": "createApiPaymentMethod",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPaymentMethodMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Método de pago creado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPaymentMethodCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payment_methods:write"
        ]
      }
    },
    "/api/v1/payment-methods/{payment_method_id}": {
      "get": {
        "summary": "Obtener método de pago",
        "description": "Obtiene un método de pago por ID.",
        "operationId": "getApiPaymentMethod",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "payment_method_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Método de pago obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPaymentMethodDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Parámetros inválidos",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Método de pago no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Método de pago no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payment_methods:read"
        ]
      },
      "put": {
        "summary": "Actualizar método de pago",
        "description": "Actualiza el nombre, estado o configuración contable de un método de pago.",
        "operationId": "updateApiPaymentMethod",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "payment_method_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPaymentMethodMutationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Método de pago actualizado exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPaymentMethodUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Método de pago no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Método de pago no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "payment_methods:write"
        ]
      }
    },
    "/api/v1/cash-sources": {
      "get": {
        "summary": "Listar cajas para efectivo",
        "description": "Lista las cajas operativas y cajas fuertes accesibles para registrar pagos en efectivo en ventas.",
        "operationId": "listApiCashSources",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre, ubicación o punto de venta",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Tipo de caja a devolver. Puede repetirse o enviarse separado por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnum1579b1abf3"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "types",
            "in": "query",
            "description": "Alias plural de type.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnum1579b1abf3"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "include_inactive",
            "in": "query",
            "description": "Incluye cajas inactivas",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cajas obtenidas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCashSourceListResponse"
                },
                "examples": {
                  "cash_sources": {
                    "summary": "Cajas para pagos en efectivo",
                    "value": {
                      "request_id": "req_cash_sources_1",
                      "object": "list",
                      "url": "/api/v1/cash-sources",
                      "data": [
                        {
                          "object": "cash_source",
                          "id": "550e8400-e29b-41d4-a716-446655440701",
                          "type": "register",
                          "name": "Caja mostrador",
                          "currency": "PES",
                          "warehouse_id": "550e8400-e29b-41d4-a716-446655440010",
                          "warehouse_name": "Local",
                          "default_point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
                          "default_point_of_sale_name": "Mostrador",
                          "is_active": true,
                          "created_at": "2026-04-10T10:00:00.000Z",
                          "updated_at": "2026-04-10T10:00:00.000Z"
                        },
                        {
                          "object": "cash_source",
                          "id": "550e8400-e29b-41d4-a716-446655440702",
                          "type": "safe",
                          "name": "Caja fuerte",
                          "currency": "PES",
                          "warehouse_id": null,
                          "warehouse_name": null,
                          "default_point_of_sale_id": null,
                          "default_point_of_sale_name": null,
                          "is_active": true,
                          "created_at": "2026-04-10T10:00:00.000Z",
                          "updated_at": "2026-04-10T10:00:00.000Z"
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_cash_sources_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing cash sources",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scopes insuficientes",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_cash_sources_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list cash sources",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:read"
        ]
      }
    },
    "/api/v1/points-of-sale": {
      "get": {
        "summary": "Listar puntos de venta",
        "description": "Lista los puntos de venta accesibles para la API key autenticada.",
        "operationId": "listApiPointsOfSale",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por nombre o número",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_inactive",
            "in": "query",
            "description": "Incluye puntos de venta inactivos",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Puntos de venta obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPointOfSaleListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_points_of_sale_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing points of sale",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_points_of_sale_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_points_of_sale_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_points_of_sale_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list points of sale",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "sales:read"
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst pointsOfSale = await lapyme.pointsOfSale.listPointsOfSale({\n  limit: 20,\n});\n"
          }
        ]
      }
    },
    "/api/v1/inventory": {
      "get": {
        "summary": "Consultar inventario por depósito",
        "description": "Devuelve el inventario de un depósito específico con filtros por categoría, tipo y cantidades.",
        "operationId": "listApiInventory",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "description": "ID del depósito a consultar",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Texto de búsqueda por producto, SKU, código de barras o variante",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Alias de query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category_ids",
            "in": "query",
            "description": "IDs de categorías. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "product_types",
            "in": "query",
            "description": "Tipos de producto. Puede repetirse o enviarse separada por comas.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ApiSharedEnum5c962a8637"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "available_rule",
            "in": "query",
            "description": "Regla para el filtro de stock disponible",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnuma4e4082638"
            }
          },
          {
            "name": "available_amount",
            "in": "query",
            "description": "Cantidad exacta cuando availableRule=equal",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "available_min",
            "in": "query",
            "description": "Cantidad mínima cuando availableRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "available_max",
            "in": "query",
            "description": "Cantidad máxima cuando availableRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "on_hand_rule",
            "in": "query",
            "description": "Regla para el filtro de stock físico",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnuma4e4082638"
            }
          },
          {
            "name": "on_hand_amount",
            "in": "query",
            "description": "Cantidad exacta cuando onHandRule=equal",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "on_hand_min",
            "in": "query",
            "description": "Cantidad mínima cuando onHandRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "on_hand_max",
            "in": "query",
            "description": "Cantidad máxima cuando onHandRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "reserved_rule",
            "in": "query",
            "description": "Regla para el filtro de stock reservado",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnuma4e4082638"
            }
          },
          {
            "name": "reserved_amount",
            "in": "query",
            "description": "Cantidad exacta cuando reservedRule=equal",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "reserved_min",
            "in": "query",
            "description": "Cantidad mínima cuando reservedRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "reserved_max",
            "in": "query",
            "description": "Cantidad máxima cuando reservedRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "incoming_rule",
            "in": "query",
            "description": "Regla para el filtro de stock entrante",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnuma4e4082638"
            }
          },
          {
            "name": "incoming_amount",
            "in": "query",
            "description": "Cantidad exacta cuando incomingRule=equal",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "incoming_min",
            "in": "query",
            "description": "Cantidad mínima cuando incomingRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "incoming_max",
            "in": "query",
            "description": "Cantidad máxima cuando incomingRule=between",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Inventario obtenido exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInventoryListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_inventory_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for querying inventory",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_inventory_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_inventory_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Depósito no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "NOT_FOUND",
                    "value": {
                      "request_id": "req_inventory_1",
                      "error": {
                        "code": "NOT_FOUND",
                        "message": "Warehouse not found",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_inventory_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not query inventory",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "products:read",
            "warehouses:read"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst inventory = await lapyme.inventory.listInventory({\n  warehouseId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n  limit: 20,\n  query: \"remera\",\n});\n"
          }
        ]
      }
    },
    "/api/v1/inventory/movements": {
      "get": {
        "summary": "Listar movimientos de inventario",
        "description": "Lista el historial de movimientos de inventario del producto, opcionalmente filtrado por depósito.",
        "operationId": "listApiInventoryMovements",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "description": "ID de producto o variante",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "description": "Filtra por depósito",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Movimientos obtenidos exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInventoryMovementListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parámetros inválidos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_inventory_movements_1",
                      "error": {
                        "code": "INVALID_REQUEST",
                        "message": "Invalid parameters for listing inventory movements",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "AUTHENTICATION_REQUIRED",
                    "value": {
                      "request_id": "req_inventory_movements_1",
                      "error": {
                        "code": "AUTHENTICATION_REQUIRED",
                        "message": "API key is required in the Authorization header",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scopes insuficientes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "FORBIDDEN",
                    "value": {
                      "request_id": "req_inventory_movements_1",
                      "error": {
                        "code": "FORBIDDEN",
                        "message": "Your API key does not have permission for this operation",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INTERNAL_ERROR",
                    "value": {
                      "request_id": "req_inventory_movements_1",
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "message": "Could not list inventory movements",
                        "retryable": false,
                        "type": "invalid_request_error",
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "products:read"
          ]
        ],
        "x-codeSamples": [
          {
            "lang": "typescript",
            "label": "La Pyme SDK",
            "source": "import { Lapyme } from \"lapyme\";\n\nconst lapyme = new Lapyme({\n  bearerAuth: process.env[\"LAPYME_API_KEY\"] ?? \"\",\n});\n\nconst movements = await lapyme.inventory.listInventoryMovements({\n  limit: 20,\n  productId: \"9c692e8b-0f9a-4f7c-8b99-061a2eb188ae\",\n});\n"
          }
        ]
      }
    },
    "/api/v1/accounting/accounts": {
      "get": {
        "summary": "Listar cuentas contables",
        "description": "Lista el plan de cuentas disponible para asientos y reportes contables.",
        "operationId": "listApiAccountingAccounts",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_postable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum5433445ffc"
            }
          },
          {
            "name": "parent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "system_role",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum87e38e3147"
            }
          },
          {
            "name": "is_inflation_adjustable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cuentas listadas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "object": {
                      "$ref": "#/components/schemas/ApiSharedEnume0cf0306aa"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiAccountingAccount"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      },
      "post": {
        "summary": "Crear cuenta contable",
        "description": "Crea una cuenta contable y permite configurar system_role e is_inflation_adjustable en el recurso cuenta.",
        "operationId": "createApiAccountingAccount",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAccountingAccountCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cuenta devuelta por replay idempotente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAccountingAccountWriteResponse"
                }
              }
            }
          },
          "201": {
            "description": "Cuenta creada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAccountingAccountWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de configuración contable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de configuración contable",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      }
    },
    "/api/v1/accounting/accounts/{account_id}": {
      "get": {
        "summary": "Obtener cuenta contable",
        "description": "Devuelve una cuenta contable visible de la organización autenticada por su ID.",
        "operationId": "getApiAccountingAccount",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cuenta encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ApiAccountingAccount"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cuenta no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Cuenta no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      },
      "patch": {
        "summary": "Actualizar cuenta contable",
        "description": "Actualiza parcialmente metadatos y configuración de una cuenta contable, incluyendo system_role e is_inflation_adjustable.",
        "operationId": "updateApiAccountingAccount",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAccountingAccountPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cuenta actualizada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAccountingAccountWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cuenta no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Cuenta no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de configuración contable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de configuración contable",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      },
      "delete": {
        "summary": "Desactivar cuenta contable",
        "description": "Desactiva una cuenta contable sin borrar sus referencias históricas. Si la cuenta tenía system_role, el rol se limpia para mantener válida la configuración.",
        "operationId": "deactivateApiAccountingAccount",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cuenta desactivada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAccountingAccountWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cuenta no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Cuenta no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de configuración contable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de configuración contable",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      }
    },
    "/api/v1/accounting/cost-center-dimensions": {
      "get": {
        "summary": "Listar dimensiones de centros de costo",
        "description": "Lista las dimensiones de centros de costo disponibles y permite incluir dimensiones inactivas.",
        "operationId": "listApiCostCenterDimensions",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dimensiones listadas exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "object": {
                      "$ref": "#/components/schemas/ApiSharedEnume0cf0306aa"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiCostCenterDimension"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    },
    "/api/v1/accounting/cost-centers": {
      "get": {
        "summary": "Listar centros de costo",
        "description": "Lista centros de costo y permite filtrar por dimensión, posición y estado activo.",
        "operationId": "listApiCostCenters",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "dimension_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "position",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3
            }
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Centros de costo listados exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "object": {
                      "$ref": "#/components/schemas/ApiSharedEnume0cf0306aa"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiCostCenter"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    },
    "/api/v1/accounting/trial-balance": {
      "get": {
        "summary": "Obtener sumas y saldos",
        "description": "Calcula sumas y saldos para el período y los filtros contables solicitados.",
        "operationId": "getApiTrialBalance",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Fecha inicial del período. Obligatoria junto con date_to si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Fecha final inclusiva del período. Obligatoria junto con date_from si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_preset",
            "in": "query",
            "required": false,
            "description": "Atajo de período resuelto por la API a date_from/date_to en horario de Argentina. No enviarlo junto con date_from/date_to.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumab9ba78640"
            }
          },
          {
            "name": "cost_center_1_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_2_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_3_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sumas y saldos obtenido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedObject682bce59ac"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    },
    "/api/v1/accounting/income-statement": {
      "get": {
        "summary": "Obtener estado de resultados",
        "description": "Calcula el estado de resultados para un período en la moneda de reporte solicitada.",
        "operationId": "getApiIncomeStatement",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Fecha inicial del período. Obligatoria junto con date_to si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Fecha final inclusiva del período. Obligatoria junto con date_from si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_preset",
            "in": "query",
            "required": false,
            "description": "Atajo de período resuelto por la API a date_from/date_to en horario de Argentina. No enviarlo junto con date_from/date_to.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumab9ba78640"
            }
          },
          {
            "name": "cost_center_1_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_2_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_3_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "reporting_currency",
            "in": "query",
            "required": false,
            "description": "Moneda de presentación del estado de resultados. PES devuelve importes en pesos argentinos; DOL convierte los importes contables ARS a USD usando cotización BCRA por fecha de transacción.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum70385a22ba"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Estado de resultados obtenido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedObject682bce59ac"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    },
    "/api/v1/accounting/income-statement/comparative": {
      "get": {
        "summary": "Obtener estado de resultados comparativo",
        "description": "Compara el estado de resultados de dos períodos con los mismos criterios de moneda y agrupación.",
        "operationId": "getApiComparativeIncomeStatement",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Fecha inicial del período. Obligatoria junto con date_to si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Fecha final inclusiva del período. Obligatoria junto con date_from si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_preset",
            "in": "query",
            "required": false,
            "description": "Atajo de período resuelto por la API a date_from/date_to en horario de Argentina. No enviarlo junto con date_from/date_to.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumab9ba78640"
            }
          },
          {
            "name": "cost_center_1_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_2_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_3_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "reporting_currency",
            "in": "query",
            "required": false,
            "description": "Moneda de presentación del estado de resultados. PES devuelve importes en pesos argentinos; DOL convierte los importes contables ARS a USD usando cotización BCRA por fecha de transacción.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum70385a22ba"
            }
          },
          {
            "name": "compare_date_from",
            "in": "query",
            "required": false,
            "description": "Fecha inicial del período de comparación. Obligatoria junto con compare_date_to si compare_enabled=true y no se envía compare_period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "compare_date_to",
            "in": "query",
            "required": false,
            "description": "Fecha final inclusiva del período de comparación. Obligatoria junto con compare_date_from si compare_enabled=true y no se envía compare_period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "compare_period_preset",
            "in": "query",
            "required": false,
            "description": "Atajo para el período de comparación. No enviarlo junto con compare_date_from/compare_date_to.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumab9ba78640"
            }
          },
          {
            "name": "compare_enabled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comparativo obtenido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedObject682bce59ac"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    },
    "/api/v1/accounting/income-statement/by-cost-center": {
      "get": {
        "summary": "Obtener estado de resultados por centro de costo",
        "description": "Calcula el estado de resultados agrupado por la posición de centro de costo solicitada.",
        "operationId": "getApiIncomeStatementByCostCenter",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Fecha inicial del período. Obligatoria junto con date_to si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Fecha final inclusiva del período. Obligatoria junto con date_from si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_preset",
            "in": "query",
            "required": false,
            "description": "Atajo de período resuelto por la API a date_from/date_to en horario de Argentina. No enviarlo junto con date_from/date_to.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumab9ba78640"
            }
          },
          {
            "name": "cost_center_1_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_2_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_3_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "reporting_currency",
            "in": "query",
            "required": false,
            "description": "Moneda de presentación del estado de resultados. PES devuelve importes en pesos argentinos; DOL convierte los importes contables ARS a USD usando cotización BCRA por fecha de transacción.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnum70385a22ba"
            }
          },
          {
            "name": "group_by_cost_center_position",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reporte por centro de costo obtenido",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedObject682bce59ac"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    },
    "/api/v1/accounting/summarized-journal": {
      "get": {
        "summary": "Listar libro diario resumido",
        "description": "Lista asientos del libro diario en formato resumido con filtros y paginación por cursor.",
        "operationId": "listApiSummarizedJournal",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Fecha inicial del período. Obligatoria junto con date_to si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Fecha final inclusiva del período. Obligatoria junto con date_from si no se envía period_preset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "period_preset",
            "in": "query",
            "required": false,
            "description": "Atajo de período resuelto por la API a date_from/date_to en horario de Argentina. No enviarlo junto con date_from/date_to.",
            "schema": {
              "$ref": "#/components/schemas/ApiSharedEnumab9ba78640"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "source_types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest"
              ],
              "default": "oldest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Libro diario resumido listado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiJournalEntriesListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    },
    "/api/v1/accounting/inflation-adjustments/preview": {
      "post": {
        "summary": "Previsualizar ajuste por inflación",
        "description": "Calcula una previsualización del ajuste por inflación sin crear el asiento contable.",
        "operationId": "previewApiInflationAdjustment",
        "tags": [
          "API"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInflationAdjustmentPreviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Previsualización generada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSharedObject682bce59ac"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      }
    },
    "/api/v1/accounting/inflation-adjustments": {
      "post": {
        "summary": "Crear ajuste por inflación",
        "description": "Crea de forma idempotente el asiento de ajuste por inflación para el período solicitado.",
        "operationId": "createApiInflationAdjustment",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiInflationAdjustmentCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Ajuste por inflación creado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiJournalEntryWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Ajuste duplicado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Ajuste duplicado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      }
    },
    "/api/v1/accounting/journal-entries": {
      "get": {
        "summary": "Listar asientos contables",
        "description": "Lista asientos contables publicados con filtros por origen, cuenta y fecha. Usá `source_type` y `source_id` para pasar desde una venta o compra a su evidencia contable.",
        "operationId": "listApiAccountingJournalEntries",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Valor de next_cursor recibido en la respuesta anterior",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Cantidad máxima de resultados por respuesta",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "source_type",
            "in": "query",
            "description": "Tipo de origen contable, por ejemplo sale o purchase",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source_id",
            "in": "query",
            "description": "ID del recurso de origen",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "description": "Filtra asientos que tengan al menos una línea en esta cuenta",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Fecha inicial del asiento",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Fecha final del asiento",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Asientos contables listados exitosamente",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiJournalEntriesListResponse"
                },
                "examples": {
                  "sale_drilldown": {
                    "summary": "Asientos de una venta",
                    "value": {
                      "request_id": "req_accounting_1",
                      "object": "list",
                      "url": "/api/v1/accounting/journal-entries",
                      "data": [
                        {
                          "object": "journal_entry",
                          "id": "550e8400-e29b-41d4-a716-446655440301",
                          "entry_number": 12,
                          "date": "2026-05-26",
                          "description": "Venta FCB-00003-00001234",
                          "reference": "FCB-00003-00001234",
                          "source_type": "sale",
                          "source_id": "550e8400-e29b-41d4-a716-446655440007",
                          "currency": "PES",
                          "exchange_rate": null,
                          "created_at": "2026-05-26T12:00:00.000Z",
                          "updated_at": "2026-05-26T12:00:00.000Z",
                          "lines": []
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      },
      "post": {
        "summary": "Crear asiento manual",
        "description": "Crea un asiento contable manual balanceado. Requiere Idempotency-Key.",
        "operationId": "createApiManualJournalEntry",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiManualJournalEntryRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Asiento manual creado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiJournalEntryWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflicto de idempotencia o asiento no editable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de idempotencia o asiento no editable",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      }
    },
    "/api/v1/accounting/journal-entries/{journal_entry_id}": {
      "get": {
        "summary": "Obtener asiento contable",
        "description": "Devuelve el encabezado y las líneas completas de un asiento contable.",
        "operationId": "getApiAccountingJournalEntry",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "journal_entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Asiento contable encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ApiJournalEntry"
                    }
                  }
                },
                "examples": {}
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Asiento no encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Asiento no encontrado",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      },
      "put": {
        "summary": "Reemplazar asiento manual",
        "description": "Reemplaza un asiento manual editable y conserva las líneas identificadas por id. Si una línea imputada cambia financieramente, la primera solicitud devuelve allocations_require_unapply; repetí con un nuevo Idempotency-Key y unapply_allocated_lines=true para desimputar y editar en una sola transacción. Los asientos generados devuelven conflicto.",
        "operationId": "updateApiManualJournalEntry",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "journal_entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiManualJournalEntryUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Asiento manual actualizado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiJournalEntryWriteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Asiento no editable, conflicto de idempotencia o confirmación de desimputación requerida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Asiento no editable, conflicto de idempotencia o confirmación de desimputación requerida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "412": {
            "description": "Conflicto de concurrencia",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Conflicto de concurrencia",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      },
      "delete": {
        "summary": "Eliminar asiento manual",
        "description": "Elimina solo asientos manuales editables.",
        "operationId": "deleteApiManualJournalEntry",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "journal_entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Clave estable para deduplicar reintentos de la misma operación.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Asiento manual eliminado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Asiento no editable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Asiento no editable",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:write"
        ]
      }
    },
    "/api/v1/accounting/accounts/{account_id}/ledger": {
      "get": {
        "summary": "Obtener mayor de cuenta",
        "description": "Devuelve líneas del mayor para una cuenta, con saldo inicial, saldo final y saldo corriente por línea dentro de la ventana filtrada.",
        "operationId": "getApiAccountLedger",
        "tags": [
          "API"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "source_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cost_center_1_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_2_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          {
            "name": "cost_center_3_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Mayor de cuenta encontrado",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiAccountLedgerResponse"
                },
                "examples": {
                  "default": {
                    "summary": "Mayor de clientes por cobrar",
                    "value": {
                      "request_id": "req_ledger_1",
                      "data": {
                        "object": "account_ledger",
                        "account": {
                          "object": "account",
                          "id": "550e8400-e29b-41d4-a716-446655440303",
                          "code": "1.1.2",
                          "name": "Clientes por cobrar"
                        },
                        "opening_balance": 0,
                        "currency": "PES",
                        "lines": [],
                        "closing_balance": 0,
                        "has_more": false,
                        "next_cursor": null
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Solicitud inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Solicitud inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key faltante o inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "API key faltante o inválida",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope insuficiente o contabilidad no habilitada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Scope insuficiente o contabilidad no habilitada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Cuenta no encontrada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Cuenta no encontrada",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Límite de solicitudes excedido para la organización",
            "headers": {
              "Retry-After": {
                "description": "Segundos a esperar antes de volver a intentar la solicitud.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Límite de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Segundos restantes hasta el reset de la ventana activa.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              },
              "RateLimit-Limit": {
                "description": "Límite de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "5000"
                }
              },
              "RateLimit-Remaining": {
                "description": "Solicitudes restantes en la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "0"
                }
              },
              "RateLimit-Reset": {
                "description": "Segundos hasta el reset de la ventana activa en formato estándar.",
                "schema": {
                  "type": "string",
                  "example": "30"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "RATE_LIMITED",
                    "value": {
                      "request_id": "req_rate_limit_1",
                      "error": {
                        "type": "rate_limit_error",
                        "code": "RATE_LIMITED",
                        "message": "The organization request limit was reached. Try again later.",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error interno del servidor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "default": {
                    "summary": "INVALID_REQUEST",
                    "value": {
                      "request_id": "req_error_1",
                      "error": {
                        "type": "invalid_request_error",
                        "code": "INVALID_REQUEST",
                        "message": "Error interno del servidor",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-accepted-legacy-scope-sets": [
          [
            "reports:read"
          ]
        ]
      }
    }
  }
}