{
  "openapi": "3.0.3",
  "info": {
    "title": "OfficeGest API",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://og-tenant1.test:8003/api/v2",
      "variables": {
        "name": {
          "default": "Tenant 1"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": true,
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "VALIDATION_FAILED",
                  "INVALID_FILTER",
                  "NOT_FOUND",
                  "UNAUTHENTICATED",
                  "FORBIDDEN",
                  "CONFLICT",
                  "RATE_LIMITED",
                  "INTERNAL_ERROR",
                  "BAD_REQUEST",
                  "BAD_GATEWAY",
                  "SERVICE_UNAVAILABLE",
                  "INVALID_CREDENTIALS",
                  "ARTICLE_NOT_FOUND",
                  "INVALID_CURSOR",
                  "ARTICLE_NOT_ACTIVE",
                  "ARTICLE_HAS_TRANSACTIONS",
                  "ARTICLE_HAS_DOCUMENTS",
                  "TOKEN_EXPIRED"
                ],
                "example": "VALIDATION_FAILED"
              },
              "message": {
                "type": "string",
                "example": "The given data was invalid."
              },
              "errors": {
                "description": "422: object keyed by field name with its message or list of messages, or an empty array when the failure has no field detail. Other statuses may carry endpoint-specific detail.",
                "example": {
                  "email": [
                    "The email field is required."
                  ]
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "required": [
              "trace_id"
            ],
            "additionalProperties": true,
            "properties": {
              "trace_id": {
                "type": "string",
                "description": "Same value as the X-Trace-Id response header.",
                "example": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
              }
            }
          }
        },
        "x-error-codes": {
          "VALIDATION_FAILED": 422,
          "INVALID_FILTER": 422,
          "NOT_FOUND": 404,
          "UNAUTHENTICATED": 401,
          "FORBIDDEN": 403,
          "CONFLICT": 409,
          "RATE_LIMITED": 429,
          "INTERNAL_ERROR": 500,
          "BAD_REQUEST": 400,
          "BAD_GATEWAY": 502,
          "SERVICE_UNAVAILABLE": 503,
          "INVALID_CREDENTIALS": 401,
          "ARTICLE_NOT_FOUND": 404,
          "INVALID_CURSOR": 422,
          "ARTICLE_NOT_ACTIVE": 409,
          "ARTICLE_HAS_TRANSACTIONS": 409,
          "ARTICLE_HAS_DOCUMENTS": 409,
          "TOKEN_EXPIRED": 401
        }
      },
      "PaginationMeta": {
        "type": "object",
        "description": "RFC-004 pagination metadata. The response middleware may add further keys, such as trace_id, call_id, throttle_* and monthly_*.",
        "required": [
          "per_page",
          "current_page",
          "has_more"
        ],
        "properties": {
          "per_page": {
            "type": "integer",
            "example": 50
          },
          "current_page": {
            "type": "integer",
            "example": 1
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether at least one more item exists after this page.",
            "example": true
          }
        },
        "additionalProperties": true
      },
      "OffsetPaginationMeta": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "type": "object",
            "required": [
              "total"
            ],
            "properties": {
              "total": {
                "type": "integer",
                "example": 120
              },
              "last_page": {
                "type": "integer",
                "nullable": true,
                "deprecated": true,
                "example": 3
              },
              "from": {
                "type": "integer",
                "nullable": true,
                "deprecated": true,
                "description": "Null on an empty page.",
                "example": 1
              },
              "to": {
                "type": "integer",
                "nullable": true,
                "deprecated": true,
                "description": "Null on an empty page.",
                "example": 50
              }
            }
          }
        ]
      },
      "CursorPaginationMeta": {
        "type": "object",
        "description": "RFC-004 cursor pagination metadata. Send next or previous back as the cursor parameter to move between pages.",
        "required": [
          "next",
          "previous",
          "has_more",
          "per_page"
        ],
        "properties": {
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Null when has_more is false."
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "description": "Null when the request carried no cursor."
          },
          "has_more": {
            "type": "boolean",
            "example": true
          },
          "per_page": {
            "type": "integer",
            "example": 50
          }
        },
        "additionalProperties": true
      },
      "AccountingCostCenterOutputDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "AccountingCostCenterOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Accounting\\CostCenter\\DTOs\\AccountingCostCenterOutputDTO"
      },
      "AttachmentOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Attachment ID"
          },
          "description": {
            "type": "string",
            "description": "Attachment subject/description"
          },
          "show_name": {
            "type": "string",
            "description": "Original file name"
          },
          "file_type": {
            "type": "string",
            "description": "MIME type"
          },
          "file_size": {
            "type": "integer",
            "description": "File size in bytes"
          },
          "entity_type": {
            "type": "string",
            "description": "Entity type (C/F/R/T)"
          },
          "entity_id": {
            "type": "integer",
            "description": "Entity ID"
          },
          "document_type": {
            "type": "string",
            "description": "Document type code"
          },
          "document_number": {
            "type": "integer",
            "description": "Document number"
          },
          "article_id": {
            "type": "string",
            "description": "Article code"
          },
          "category_id": {
            "type": "integer",
            "description": "Attachment category ID"
          },
          "plate": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "is_public": {
            "type": "boolean",
            "description": "Whether the attachment is public"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "Attachment date"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "url": {
            "type": "string",
            "description": "Download URL"
          }
        },
        "title": "AttachmentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Attachments\\DTOs\\AttachmentOutputDTO"
      },
      "AttachmentCategoryOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Category ID"
          },
          "name": {
            "type": "string",
            "description": "Category name"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the category is active"
          },
          "attachments_count": {
            "type": "integer",
            "description": "Number of attachments in the category"
          }
        },
        "title": "AttachmentCategoryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Attachments\\Categories\\DTOs\\AttachmentCategoryOutputDTO"
      },
      "UserOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "short_name": {
            "type": "string"
          },
          "department_id": {
            "type": "integer"
          },
          "warehouse_id": {
            "type": "integer"
          },
          "commercial_id": {
            "type": "integer",
            "nullable": true
          },
          "warehouses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "series": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "title": "UserOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Auth\\Api\\DTOs\\UserOutputDTO"
      },
      "CompanyOutputDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "short_name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          },
          "mobilephone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "country_code": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "CompanyOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Auth\\Api\\DTOs\\CompanyOutputDTO"
      },
      "AuthApiOutputDTO": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string",
            "enum": [
              "Bearer"
            ]
          },
          "expires_in": {
            "type": "integer",
            "nullable": true,
            "description": "Token lifetime in seconds"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "user": {
            "$ref": "#/components/schemas/UserOutputDTO"
          },
          "company": {
            "$ref": "#/components/schemas/CompanyOutputDTO"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "title": "AuthApiOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Auth\\Api\\DTOs\\AuthApiOutputDTO"
      },
      "CrmAppointmentOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Appointment identifier"
          },
          "title": {
            "type": "string",
            "nullable": true,
            "description": "Appointment subject"
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Start date and time"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "End date and time"
          },
          "confirmed": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the appointment is confirmed"
          },
          "completed": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the appointment is completed"
          },
          "no_show": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the customer failed to show up"
          },
          "no_show_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When no_show was registered"
          },
          "no_show_by": {
            "type": "object",
            "nullable": true,
            "description": "User who registered no_show (id + name)"
          },
          "rescheduled_from": {
            "type": "integer",
            "nullable": true,
            "description": "Appointment this one was rescheduled from"
          },
          "employee_id": {
            "type": "integer",
            "nullable": true,
            "description": "Assigned employee identifier"
          },
          "priority": {
            "type": "string",
            "nullable": true,
            "description": "Appointment priority level"
          },
          "location": {
            "type": "string",
            "nullable": true,
            "description": "Appointment location"
          },
          "event_type": {
            "type": "string",
            "nullable": true,
            "description": "Event kind: Appt, Phone, ToDo or Email"
          },
          "vehicle_ref": {
            "type": "string",
            "nullable": true,
            "description": "Plate of the vehicle linked to the appointment (CodEquipExt); null when none"
          },
          "category": {
            "type": "object",
            "nullable": true,
            "description": "Event category (id, name, color); null when none"
          },
          "entities": {
            "type": "array",
            "description": "Entities linked to the appointment (id, type, name); empty when none"
          }
        },
        "title": "CrmAppointmentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Crm\\Appointments\\DTOs\\CrmAppointmentOutputDTO"
      },
      "AppointmentCategoryOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "CAT001",
            "description": "Unique category identifier"
          },
          "name": {
            "type": "string",
            "example": "Reunião de Vendas",
            "description": "Category display name"
          },
          "color": {
            "type": "string",
            "nullable": true,
            "example": "#FF5733",
            "description": "Hex color code for UI representation"
          }
        },
        "title": "AppointmentCategoryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Crm\\Support\\AppointmentCategories\\DTOs\\AppointmentCategoryOutputDTO"
      },
      "TaskTypeOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Task type identifier"
          },
          "name": {
            "type": "string",
            "description": "Task type name"
          },
          "icon": {
            "type": "string",
            "description": "Icon label"
          },
          "color": {
            "type": "string",
            "nullable": true,
            "description": "Color value"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the task type is active"
          }
        },
        "title": "TaskTypeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Crm\\Support\\TaskTypes\\DTOs\\TaskTypeOutputDTO"
      },
      "InvoiceOcrStartOutputDTO": {
        "type": "object",
        "properties": {
          "ocr_id": {
            "type": "string",
            "description": "Handle used to poll the reading result"
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "completed",
              "failed"
            ]
          }
        },
        "title": "InvoiceOcrStartOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Dms\\Ocr\\DTOs\\InvoiceOcrStartOutputDTO"
      },
      "GalleryPhotoOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Attachment ID"
          },
          "is_main": {
            "type": "boolean",
            "description": "Whether this is the main photo"
          },
          "watermark_id": {
            "type": "integer",
            "description": "Watermark attachment ID",
            "nullable": true
          },
          "attachment": {
            "type": "object",
            "description": "Attachment details (file info and URL)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          }
        },
        "title": "GalleryPhotoOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\GalleryPhotoOutputDTO"
      },
      "ProcessDetailOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "process_code": {
            "type": "string"
          },
          "document_type": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "integer",
            "nullable": true
          },
          "plate": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "integer"
          },
          "barcode": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "imtt_delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "shipment_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "destruction_certificate_number": {
            "type": "string",
            "nullable": true
          },
          "egar_number": {
            "type": "string",
            "nullable": true
          },
          "tare": {
            "type": "number"
          },
          "transport_km": {
            "type": "number"
          },
          "transport_other": {
            "type": "number"
          },
          "has_transport_service": {
            "type": "boolean"
          },
          "is_retail_car": {
            "type": "boolean"
          },
          "is_deleted": {
            "type": "boolean"
          },
          "has_partial_dismantling": {
            "type": "boolean"
          },
          "has_residue": {
            "type": "boolean"
          },
          "test_checklist": {
            "type": "boolean"
          },
          "billing_customer_id": {
            "type": "integer",
            "nullable": true
          },
          "owner_customer_id": {
            "type": "integer",
            "nullable": true
          },
          "sector_id": {
            "type": "integer",
            "nullable": true
          },
          "stock_movement_in": {
            "type": "integer",
            "nullable": true
          },
          "stock_movement_out": {
            "type": "integer",
            "nullable": true
          },
          "operator_code": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "vehicle": {
            "type": "object",
            "nullable": true
          },
          "sector": {
            "type": "object",
            "nullable": true
          }
        },
        "title": "ProcessDetailOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\ProcessDetailOutputDTO"
      },
      "ValidateEntityLoginOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "ValidateEntityLoginOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Common\\DTOs\\ValidateEntityLoginOutputDTO"
      },
      "LoginAvailabilityOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "LoginAvailabilityOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Common\\DTOs\\LoginAvailabilityOutputDTO"
      },
      "ValidateLoginOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "ValidateLoginOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\ValidateLoginOutputDTO"
      },
      "EntitiesCustomerOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 123
          },
          "name": {
            "type": "string",
            "example": "Empresa Exemplo Lda"
          },
          "tax_id": {
            "type": "string",
            "example": "123456789"
          },
          "type": {
            "type": "string",
            "enum": [
              "E",
              "I",
              "P"
            ]
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "Rua das Flores, 123"
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "Lisboa"
          },
          "district_id": {
            "type": "integer",
            "nullable": true,
            "example": 11
          },
          "postal_code": {
            "type": "string",
            "nullable": true,
            "example": "1000-001"
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "example": "PT"
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "example": "213456789"
          },
          "phone2": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "contacto@empresa.pt"
          },
          "webpage": {
            "type": "string",
            "nullable": true
          },
          "vendor_code": {
            "type": "integer",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "example": true
          },
          "entity_type": {
            "type": "string",
            "nullable": true
          },
          "classification_code": {
            "type": "string",
            "nullable": true
          },
          "campaign_code": {
            "type": "integer",
            "nullable": true
          },
          "gdpr_data_processing_date": {
            "type": "string",
            "nullable": true
          },
          "gdpr_allow_mailing": {
            "type": "boolean",
            "nullable": true
          },
          "activity_sector_id": {
            "type": "integer",
            "nullable": true
          },
          "client_manager_id": {
            "type": "integer",
            "nullable": true
          },
          "exemption_reason_id": {
            "type": "integer",
            "nullable": true
          },
          "latitude": {
            "type": "string",
            "nullable": true,
            "example": "38.7169"
          },
          "longitude": {
            "type": "string",
            "nullable": true,
            "example": "-9.1399"
          }
        },
        "title": "EntitiesCustomerOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\EntitiesCustomerOutputDTO"
      },
      "CustomerAddressOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "customer_id": {
            "type": "integer"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "nullable": true
          },
          "latitude": {
            "type": "string",
            "nullable": true
          },
          "longitude": {
            "type": "string",
            "nullable": true
          },
          "address_web_id": {
            "type": "integer",
            "nullable": true
          },
          "sync_flag": {
            "type": "string",
            "nullable": true
          },
          "preferred_unloading_location": {
            "type": "integer"
          },
          "vendor_code": {
            "type": "integer",
            "nullable": true
          },
          "zone_code": {
            "type": "string",
            "nullable": true
          },
          "client_manager_id": {
            "type": "integer",
            "nullable": true
          },
          "wmso_warehouse_in_id": {
            "type": "integer",
            "nullable": true
          },
          "wmso_route": {
            "type": "string",
            "nullable": true
          },
          "wmso_warehouse_out_id": {
            "type": "integer",
            "nullable": true
          },
          "wmso_flow": {
            "type": "string",
            "nullable": true
          },
          "customer_invoice_id": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "datetime",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "datetime",
            "nullable": true
          }
        },
        "title": "CustomerAddressOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\CustomerAddressOutputDTO"
      },
      "EntitiesSupplierOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 456
          },
          "name": {
            "type": "string",
            "example": "Fornecedor Industrial Lda"
          },
          "tax_id": {
            "type": "string",
            "nullable": true,
            "example": "987654321"
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "Av. da Indústria, 456"
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "Porto"
          },
          "postal_code": {
            "type": "string",
            "nullable": true,
            "example": "4000-123"
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "example": "PT"
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "example": "225789456"
          },
          "phone2": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "comercial@fornecedor.pt"
          },
          "webpage": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "example": true
          },
          "entity_type": {
            "type": "string",
            "nullable": true
          },
          "classification_code": {
            "type": "string",
            "nullable": true
          },
          "is_service_provider": {
            "type": "boolean",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "EntitiesSupplierOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Suppliers\\DTOs\\EntitiesSupplierOutputDTO"
      },
      "SupplierAddressOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "supplier_id": {
            "type": "integer"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "datetime",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "datetime",
            "nullable": true
          }
        },
        "title": "SupplierAddressOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Suppliers\\DTOs\\SupplierAddressOutputDTO"
      },
      "ProspectOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 789
          },
          "name": {
            "type": "string",
            "example": "Prospect Exemplo Lda"
          },
          "tax_id": {
            "type": "string",
            "nullable": true,
            "example": "123456789"
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "Rua das Flores, 123"
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "Lisboa"
          },
          "district_id": {
            "type": "integer",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true,
            "example": "1000-001"
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "example": "PT"
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "example": "213456789"
          },
          "phone2": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "contacto@prospect.pt"
          },
          "active": {
            "type": "boolean",
            "example": true
          }
        },
        "title": "ProspectOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Prospects\\DTOs\\ProspectOutputDTO"
      },
      "ProspectAddressOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "prospect_id": {
            "type": "integer"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "datetime",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "datetime",
            "nullable": true
          }
        },
        "title": "ProspectAddressOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Prospects\\DTOs\\ProspectAddressOutputDTO"
      },
      "SellerOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "Comercial Silva"
          },
          "tax_number": {
            "type": "string",
            "nullable": true,
            "example": "999999990"
          },
          "national_identity_card": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "locale": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true,
            "example": "1000-001"
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "example": "PT"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "phone2": {
            "type": "string",
            "nullable": true
          },
          "cellphone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "comercial@empresa.pt"
          },
          "login": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "example": true
          },
          "team_code": {
            "type": "integer",
            "nullable": true
          },
          "classification_code": {
            "type": "string",
            "nullable": true
          },
          "campaign_code": {
            "type": "string",
            "nullable": true
          },
          "commission_type_code": {
            "type": "string",
            "nullable": true
          },
          "bank_account_number": {
            "type": "string",
            "nullable": true
          },
          "council_code": {
            "type": "integer",
            "nullable": true
          },
          "district_code": {
            "type": "integer",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "rgdp_allow_mailing": {
            "type": "boolean",
            "nullable": true
          },
          "rgdp_allow_date_processing_at": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "rgdp_signature": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "SellerOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Sellers\\DTOs\\SellerOutputDTO"
      },
      "ContactOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "Joao Silva"
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "Rua das Flores 123"
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "Lisboa"
          },
          "zipcode": {
            "type": "string",
            "nullable": true,
            "example": "1000-001"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "example": "PT"
          },
          "phone1": {
            "type": "string",
            "nullable": true,
            "example": "+351.912345678"
          },
          "phone2": {
            "type": "string",
            "nullable": true,
            "example": "+351.912345679"
          },
          "mobilephone": {
            "type": "string",
            "nullable": true,
            "example": "+351.961234567"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "joao@exemplo.pt"
          },
          "email2": {
            "type": "string",
            "nullable": true
          },
          "email3": {
            "type": "string",
            "nullable": true
          },
          "taxid": {
            "type": "string",
            "nullable": true,
            "example": "123456789"
          },
          "profession_id": {
            "type": "string",
            "nullable": true,
            "example": "1"
          },
          "rgdp_allow_mailing": {
            "type": "boolean",
            "example": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "ContactOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Contacts\\DTOs\\ContactOutputDTO"
      },
      "EntitiesEmployeeOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "João Silva"
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "example": "PT"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "phone2": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "joao.silva@empresa.pt"
          },
          "active": {
            "type": "boolean",
            "example": true
          },
          "web_active": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "login": {
            "type": "string",
            "nullable": true
          },
          "team_code": {
            "type": "integer",
            "nullable": true
          },
          "permissions_group": {
            "type": "integer",
            "nullable": true
          },
          "warehouse_id": {
            "type": "integer",
            "nullable": true
          },
          "department_id": {
            "type": "integer",
            "nullable": true
          },
          "warehouses_access": {
            "type": "string",
            "nullable": true
          },
          "show_on_workshop_agenda": {
            "type": "boolean",
            "nullable": true,
            "example": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "EntitiesEmployeeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Employees\\DTOs\\EntitiesEmployeeOutputDTO"
      },
      "FranchiseConnectionOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "url": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "database": {
            "type": "string"
          },
          "date_reg": {
            "type": "string"
          },
          "oper_reg": {
            "type": "number"
          }
        },
        "title": "FranchiseConnectionOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Franchise\\DTOs\\FranchiseConnectionOutputDTO"
      },
      "FranchiseCommandResultOutputDTO": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True when every query ran without errors"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Database error messages per failing query"
          },
          "queries_executed": {
            "type": "integer",
            "description": "Number of queries executed successfully before rollback"
          }
        },
        "title": "FranchiseCommandResultOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Franchise\\DTOs\\FranchiseCommandResultOutputDTO"
      },
      "AppointmentOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "AppointmentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\AppointmentOutputDTO"
      },
      "AppointmentPlanOutputDTO": {
        "type": "object",
        "properties": {
          "appointments": {
            "type": "array",
            "description": "One proposed appointment per classic body, or per group in the order sent.",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "description": "Start of the first segment, local time.",
                  "type": "string",
                  "format": "date-time"
                },
                "end": {
                  "description": "End of the last segment, local time.",
                  "type": "string",
                  "format": "date-time"
                },
                "allow_split": {
                  "type": "boolean",
                  "description": "The option the appointment was laid with: its group's own, else the request's."
                },
                "segments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Local time, `Y-m-d H:i:s`."
                      },
                      "end": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Local time, `Y-m-d H:i:s`."
                      },
                      "interventions": {
                        "type": "array",
                        "description": "The interventions the segment covers and the minutes of each; time the interventions do not cover has a null `intervention_id`.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "intervention_id": {
                              "type": "integer",
                              "nullable": true
                            },
                            "minutes": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "title": "AppointmentPlanOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\AppointmentPlanOutputDTO"
      },
      "AppointmentsBatchOutputDTO": {
        "type": "object",
        "properties": {
          "service_order": {
            "type": "object",
            "nullable": true,
            "description": "Service order shared by the created appointments, null when none was linked or created",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "appointments": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "title": "AppointmentsBatchOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\AppointmentsBatchOutputDTO"
      },
      "AppointmentServiceOrderAssociationOutputDTO": {
        "type": "object",
        "properties": {
          "service_order": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "appointment_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "title": "AppointmentServiceOrderAssociationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\AppointmentServiceOrderAssociationOutputDTO"
      },
      "InterventionOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Intervention identifier"
          },
          "description": {
            "type": "string",
            "description": "Intervention description"
          },
          "estimated_time": {
            "type": "number",
            "format": "decimal",
            "description": "Estimated time in hours"
          },
          "value_without_vat": {
            "type": "number",
            "format": "decimal",
            "description": "Value without VAT"
          },
          "vat_id": {
            "type": "integer",
            "description": "VAT rate identifier"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the intervention is active"
          },
          "depends_on": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Interventions that must be done before this one"
          },
          "is_splittable": {
            "type": "boolean",
            "description": "Whether the intervention can be interrupted halfway"
          },
          "sequence": {
            "type": "integer",
            "description": "Default execution order inside an appointment; 0 means unordered"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "InterventionOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Intervention\\DTOs\\InterventionOutputDTO"
      },
      "VehiclePlateOutputDTO": {
        "type": "object",
        "properties": {
          "origin": {
            "type": "string",
            "description": "Source used to resolve the vehicle plate"
          },
          "created": {
            "type": "boolean",
            "description": "Whether the vehicle was auto-created from the external service"
          },
          "vehicle": {
            "type": "object",
            "description": "Resolved vehicle data",
            "properties": {
              "plate": {
                "type": "string",
                "description": "Vehicle plate"
              },
              "description": {
                "type": "string",
                "nullable": true,
                "description": "Vehicle description"
              },
              "brand": {
                "type": "string",
                "nullable": true,
                "description": "Vehicle brand description"
              },
              "model": {
                "type": "string",
                "nullable": true,
                "description": "Vehicle model description"
              },
              "version": {
                "type": "string",
                "nullable": true,
                "description": "Vehicle version description"
              },
              "fuel": {
                "type": "string",
                "nullable": true,
                "description": "Vehicle fuel description"
              },
              "brand_id": {
                "type": "integer",
                "nullable": true,
                "description": "Vehicle brand id"
              },
              "model_id": {
                "type": "integer",
                "nullable": true,
                "description": "Vehicle model id"
              },
              "version_id": {
                "type": "integer",
                "nullable": true,
                "description": "Vehicle version id"
              },
              "fuel_id": {
                "type": "integer",
                "nullable": true,
                "description": "Vehicle fuel id"
              },
              "vin": {
                "type": "string",
                "nullable": true,
                "description": "Vehicle identification number"
              },
              "km_counter": {
                "type": "integer",
                "nullable": true,
                "description": "Current kilometer counter"
              },
              "billing_customer_id": {
                "type": "integer",
                "nullable": true,
                "description": "Billing client id"
              }
            },
            "required": [
              "plate"
            ]
          }
        },
        "title": "VehiclePlateOutputDTO",
        "required": [
          "origin",
          "created",
          "vehicle"
        ],
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehiclePlateOutputDTO"
      },
      "VehiclePlateReadingOutputDTO": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "description": "Recognized vehicle plate"
          },
          "vehicle_found": {
            "type": "boolean",
            "description": "Whether the vehicle was found in the database"
          }
        },
        "title": "VehiclePlateReadingOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehiclePlateReadingOutputDTO"
      },
      "VehicleOutputDTO": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "description": {
            "type": "string",
            "description": "Vehicle description"
          },
          "vin": {
            "type": "string",
            "description": "Vehicle identification number (VIN)"
          },
          "brand_id": {
            "type": "integer",
            "description": "Brand ID"
          },
          "model_id": {
            "type": "integer",
            "description": "Model ID"
          },
          "version_id": {
            "type": "integer",
            "description": "Version ID"
          },
          "color": {
            "type": "string",
            "description": "Vehicle color"
          },
          "fuel_id": {
            "type": "integer",
            "description": "Fuel type ID"
          },
          "owner_customer_id": {
            "type": "integer",
            "description": "Owner client id"
          },
          "billing_customer_id": {
            "type": "integer",
            "description": "Billing client id"
          },
          "km_counter": {
            "type": "integer",
            "description": "Current kilometer counter"
          },
          "monthly_kms": {
            "type": "integer",
            "description": "Estimated monthly kilometers"
          },
          "next_inspection_date": {
            "type": "string",
            "format": "date",
            "description": "Next inspection date",
            "nullable": true
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether vehicle is active"
          },
          "is_stand": {
            "type": "boolean",
            "description": "Whether vehicle is active in Stand module"
          },
          "is_renting": {
            "type": "boolean",
            "description": "Whether vehicle is active in Rent-a-Car module"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last modification timestamp"
          }
        },
        "title": "VehicleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehicleOutputDTO"
      },
      "VehicleBrandDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Brand identifier"
          },
          "name": {
            "type": "string",
            "description": "Brand name"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the brand is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          },
          "is_component": {
            "type": "boolean",
            "description": "Whether the brand is a component (ECOAUTO)"
          }
        },
        "title": "VehicleBrandDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehicleBrandDTO"
      },
      "VehicleModelDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Model identifier"
          },
          "name": {
            "type": "string",
            "description": "Model name"
          },
          "brand_id": {
            "type": "integer",
            "description": "Brand identifier"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the model is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          },
          "is_component": {
            "type": "boolean",
            "description": "Whether the model is a component (ECOAUTO)"
          }
        },
        "title": "VehicleModelDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehicleModelDTO"
      },
      "VehicleVersionDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Version identifier"
          },
          "name": {
            "type": "string",
            "description": "Version name"
          },
          "model_id": {
            "type": "integer",
            "description": "Model identifier"
          },
          "date_start": {
            "type": "string",
            "format": "date",
            "description": "Production start date"
          },
          "date_end": {
            "type": "string",
            "format": "date",
            "description": "Production end date"
          },
          "vin": {
            "type": "string",
            "description": "VIN pattern"
          },
          "engine": {
            "type": "string",
            "description": "Engine specification"
          },
          "ktype": {
            "type": "string",
            "description": "KType reference"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the version is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          },
          "is_component": {
            "type": "boolean",
            "description": "Whether the version is a component (ECOAUTO)"
          }
        },
        "title": "VehicleVersionDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehicleVersionDTO"
      },
      "VehicleFuelDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Fuel type identifier"
          },
          "name": {
            "type": "string",
            "description": "Fuel type name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "VehicleFuelDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehicleFuelDTO"
      },
      "CreateServiceOrderDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Service order internal number"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "Document number, null for a draft"
          },
          "status": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "plate": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer"
          },
          "total": {
            "type": "number"
          },
          "observations": {
            "type": "string"
          }
        },
        "title": "CreateServiceOrderDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\CreateServiceOrderDTO"
      },
      "DraftServiceOrderOutputDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Service order internal number"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "Document number, null for a draft"
          },
          "status": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true
          },
          "plate": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "observations": {
            "type": "string",
            "nullable": true
          },
          "mechanic_id": {
            "type": "integer",
            "nullable": true
          },
          "km_counter": {
            "type": "integer",
            "nullable": true
          },
          "total": {
            "type": "number",
            "nullable": true
          },
          "total_without_vat": {
            "type": "number",
            "nullable": true
          },
          "vat_value": {
            "type": "number",
            "nullable": true
          },
          "seller_id": {
            "type": "integer",
            "nullable": true
          },
          "priority": {
            "type": "integer",
            "nullable": true
          },
          "planned_delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reception_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "department_id": {
            "type": "integer",
            "nullable": true
          },
          "warehouse_id": {
            "type": "integer",
            "nullable": true
          },
          "location_id": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "DraftServiceOrderOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\DTOs\\DraftServiceOrderOutputDTO"
      },
      "ServiceOrderInterventionDTO": {
        "type": "object",
        "properties": {
          "service_order": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "line_number": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "executed": {
            "type": "string"
          },
          "estimated_time": {
            "type": "number"
          }
        },
        "title": "ServiceOrderInterventionDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderInterventionDTO"
      },
      "ServiceOrderChecklistDTO": {
        "type": "object",
        "properties": {
          "checklist_id": {
            "type": "integer",
            "description": "Checklist template ID"
          },
          "description": {
            "type": "string",
            "description": "Checklist name/description"
          },
          "checked_count": {
            "type": "integer",
            "description": "Number of checked items"
          },
          "total_count": {
            "type": "integer",
            "description": "Total number of active items",
            "deprecated": true
          },
          "items": {
            "type": "array",
            "description": "Checklist items with check status and observations"
          }
        },
        "title": "ServiceOrderChecklistDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderChecklistDTO"
      },
      "CreateServiceOrderNoteDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "integer"
          },
          "subject": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        },
        "title": "CreateServiceOrderNoteDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\CreateServiceOrderNoteDTO"
      },
      "ServiceOrderExtraLineOutputDTO": {
        "type": "object",
        "properties": {
          "service_order": {
            "type": "object",
            "description": "Service order the line belongs to",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "line_number": {
            "type": "integer",
            "description": "Line number"
          },
          "article_id": {
            "type": "string",
            "description": "Article code"
          },
          "description": {
            "type": "string",
            "description": "Article description"
          },
          "description_extra": {
            "type": "string",
            "nullable": true,
            "description": "Extended description"
          },
          "article_type": {
            "type": "string",
            "nullable": true,
            "description": "Article type"
          },
          "quantity": {
            "type": "number",
            "description": "Quantity"
          },
          "measurement_unit_id": {
            "type": "string",
            "nullable": true,
            "description": "Unit code"
          },
          "unit_price": {
            "type": "number",
            "description": "Unit price without VAT"
          },
          "unit_price_with_vat": {
            "type": "number",
            "description": "Selling price with VAT"
          },
          "discount_percentage": {
            "type": "number",
            "description": "Discount percentage"
          },
          "discount_percentage_2": {
            "type": "number",
            "description": "Discount 2 percentage"
          },
          "discount_percentage_3": {
            "type": "number",
            "description": "Discount 3 percentage"
          },
          "discount_percentage_4": {
            "type": "number",
            "description": "Discount 4 percentage"
          },
          "discount_percentage_5": {
            "type": "number",
            "description": "Discount 5 percentage"
          },
          "vat_percentage": {
            "type": "number",
            "description": "VAT percentage"
          },
          "vat_exemption_reason_id": {
            "type": "string",
            "nullable": true,
            "description": "VAT exemption code"
          },
          "total_without_vat": {
            "type": "number",
            "description": "Total without VAT"
          },
          "vat_value": {
            "type": "number",
            "description": "VAT value"
          },
          "discount_value": {
            "type": "number",
            "description": "Discount value"
          },
          "mechanic_id": {
            "type": "integer",
            "nullable": true,
            "description": "Mechanic code"
          },
          "mechanic_hours": {
            "type": "number",
            "nullable": true,
            "description": "Mechanic hours"
          },
          "labor_intervention": {
            "type": "string",
            "nullable": true,
            "description": "Labor intervention flag"
          },
          "warehouse_id": {
            "type": "integer",
            "nullable": true,
            "description": "Warehouse ID"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Line status"
          },
          "status_reason": {
            "type": "string",
            "nullable": true,
            "description": "Status reason"
          },
          "observations": {
            "type": "string",
            "nullable": true,
            "description": "Observations"
          },
          "out_of_stock": {
            "type": "boolean",
            "description": "Out of stock flag"
          },
          "intervention_id": {
            "type": "integer",
            "nullable": true,
            "description": "Intervention ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Created at (ISO-8601)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Updated at (ISO-8601)"
          }
        },
        "title": "ServiceOrderExtraLineOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderExtraLineOutputDTO"
      },
      "ServiceOrderHourOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "service_order": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "employee_id": {
            "type": "integer"
          },
          "employee_name": {
            "type": "string"
          },
          "start_time": {
            "type": "string",
            "format": "date-time"
          },
          "end_time": {
            "type": "string",
            "format": "date-time"
          },
          "difference_minutes": {
            "type": "integer"
          },
          "difference_hours": {
            "type": "number"
          },
          "billable_minutes": {
            "type": "number"
          },
          "billable_hours": {
            "type": "number"
          },
          "intervention_id": {
            "type": "integer",
            "nullable": true
          },
          "end_intervention": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "ServiceOrderHourOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderHourOutputDTO"
      },
      "CameraPlateStoreOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Camera plate record ID (create only)"
          },
          "plate": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "confidence": {
            "type": "number",
            "description": "Confidence value"
          },
          "date_insert": {
            "type": "string",
            "description": "First seen date (create only)"
          },
          "date_lastseen": {
            "type": "string",
            "description": "Last seen date"
          },
          "confidence_updated": {
            "type": "boolean",
            "description": "Whether confidence was updated (update only)"
          }
        },
        "title": "CameraPlateStoreOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\CameraPlate\\DTOs\\CameraPlateStoreOutputDTO"
      },
      "ServiceOrderProcessStatusOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "ServiceOrderProcessStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\ServiceOrderProcessStatusOutputDTO"
      },
      "VehicleSummaryOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "VehicleSummaryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\VehicleSummaryOutputDTO"
      },
      "CustomerSummaryOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "CustomerSummaryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\DTOs\\CustomerSummaryOutputDTO"
      },
      "ServiceOrderProcessOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Process ID"
          },
          "plate": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle plate"
          },
          "km_counter": {
            "type": "integer",
            "nullable": true,
            "description": "Current kilometers"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Registration date"
          },
          "process_status": {
            "$ref": "#/components/schemas/ServiceOrderProcessStatusOutputDTO"
          },
          "vehicle": {
            "$ref": "#/components/schemas/VehicleSummaryOutputDTO"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerSummaryOutputDTO"
          }
        },
        "title": "ServiceOrderProcessOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\ServiceOrderProcessOutputDTO"
      },
      "AddProcessPartsOutputDTO": {
        "type": "object",
        "properties": {
          "count_added": {
            "type": "integer",
            "description": "Number of articles successfully added"
          },
          "count_failed": {
            "type": "integer",
            "description": "Number of articles that failed to be added"
          }
        },
        "title": "AddProcessPartsOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\AddProcessPartsOutputDTO"
      },
      "SyncBrightmotiveOutputDTO": {
        "type": "object",
        "properties": {
          "parts": {
            "type": "object",
            "description": "Parts sync result",
            "properties": {
              "success": {
                "type": "boolean"
              },
              "action": {
                "type": "string",
                "description": "CSV of actions performed (delete,update,insert,create)"
              },
              "process_id": {
                "type": "integer"
              },
              "workorder_id": {
                "type": "string"
              }
            }
          },
          "interventions": {
            "type": "object",
            "description": "Interventions sync result",
            "properties": {
              "success": {
                "type": "boolean"
              },
              "action": {
                "type": "string"
              },
              "process_id": {
                "type": "integer"
              },
              "workorder_id": {
                "type": "string"
              }
            }
          }
        },
        "title": "SyncBrightmotiveOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\SyncBrightmotiveOutputDTO"
      },
      "ProcessImageOutputDTO": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Image description"
          },
          "show_name": {
            "type": "string",
            "nullable": true,
            "description": "Display name"
          },
          "file_type": {
            "type": "string",
            "nullable": true,
            "description": "MIME type"
          },
          "file_size": {
            "type": "string",
            "nullable": true,
            "description": "File size"
          },
          "is_public": {
            "type": "boolean",
            "nullable": true,
            "description": "Public flag"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Upload date"
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Image URL"
          }
        },
        "title": "ProcessImageOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\ProcessImageOutputDTO"
      },
      "ProcessAttachmentOutputDTO": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Attachment description"
          },
          "show_name": {
            "type": "string",
            "nullable": true,
            "description": "Display name"
          },
          "file_type": {
            "type": "string",
            "nullable": true,
            "description": "MIME type"
          },
          "file_size": {
            "type": "string",
            "nullable": true,
            "description": "File size"
          },
          "is_public": {
            "type": "boolean",
            "nullable": true,
            "description": "Public flag"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Upload date"
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Attachment URL"
          }
        },
        "title": "ProcessAttachmentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\ProcessAttachmentOutputDTO"
      },
      "ClaimStatusOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Status ID"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Status description"
          },
          "has_associated_documents": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the status associates documents"
          },
          "sort_order": {
            "type": "integer",
            "nullable": true,
            "description": "Display order"
          }
        },
        "title": "ClaimStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Claim\\DTOs\\ClaimStatusOutputDTO"
      },
      "ClaimOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Claim number"
          },
          "process_number": {
            "type": "string",
            "nullable": true,
            "description": "Insurance process number"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Short label shown as the designation column of the claims list"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Claim description"
          },
          "plate": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle plate"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true,
            "description": "Customer ID"
          },
          "insurer_id": {
            "type": "integer",
            "nullable": true,
            "description": "Insurer ID"
          },
          "status_id": {
            "type": "integer",
            "nullable": true,
            "description": "Claim status ID"
          },
          "warehouse_id": {
            "type": "integer",
            "nullable": true,
            "description": "Warehouse ID"
          },
          "policy_number": {
            "type": "string",
            "nullable": true,
            "description": "Policy or proposal number"
          },
          "responsibility_percentage": {
            "type": "integer",
            "nullable": true,
            "description": "Responsibility percentage"
          },
          "budget_value": {
            "type": "number",
            "nullable": true,
            "description": "Budget value"
          },
          "excess_value": {
            "type": "number",
            "nullable": true,
            "description": "Insurance excess value"
          },
          "repair_value": {
            "type": "number",
            "nullable": true,
            "description": "Repair value"
          },
          "indemnified_value": {
            "type": "number",
            "nullable": true,
            "description": "Indemnified value"
          },
          "repair_days": {
            "type": "integer",
            "nullable": true,
            "description": "Estimated repair days"
          },
          "claim_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Claim date"
          },
          "report_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Report date"
          },
          "expected_entry_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expected vehicle entry date"
          },
          "expected_service_order_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expected service order date"
          },
          "closed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Process closing date"
          },
          "observations": {
            "type": "string",
            "nullable": true,
            "description": "General observations"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Registration date"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last change date"
          },
          "status": {
            "$ref": "#/components/schemas/ClaimStatusOutputDTO"
          },
          "vehicle": {
            "$ref": "#/components/schemas/VehicleSummaryOutputDTO"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerSummaryOutputDTO"
          }
        },
        "title": "ClaimOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Claim\\DTOs\\ClaimOutputDTO"
      },
      "PurchaseDraftOutputDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Draft number"
          },
          "serie": {
            "type": "string",
            "description": "Document series"
          },
          "id_supplier": {
            "type": "string",
            "description": "Supplier identifier"
          },
          "number_on_supplier": {
            "type": "string",
            "description": "Number on supplier"
          },
          "state": {
            "type": "string",
            "description": "Draft state"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Draft date"
          },
          "total": {
            "type": "number",
            "description": "Total amount with VAT"
          },
          "total_without_vat": {
            "type": "number",
            "description": "Total amount without VAT"
          },
          "value_vat": {
            "type": "number",
            "description": "VAT amount"
          },
          "discount": {
            "type": "number",
            "description": "Discount percentage"
          },
          "value_discount": {
            "type": "number",
            "description": "Discount amount"
          },
          "currency": {
            "type": "string",
            "description": "Currency code"
          },
          "name_invoice": {
            "type": "string",
            "description": "Invoice name"
          },
          "address_invoice": {
            "type": "string",
            "description": "Invoice address"
          },
          "city_invoice": {
            "type": "string",
            "description": "Invoice city"
          },
          "zipcode_invoice": {
            "type": "string",
            "description": "Invoice zip code"
          },
          "vat_number_invoice": {
            "type": "string",
            "description": "Invoice VAT number"
          },
          "id_country_invoice": {
            "type": "string",
            "description": "Invoice country identifier"
          },
          "name_delivery": {
            "type": "string",
            "description": "Delivery name"
          },
          "address_delivery": {
            "type": "string",
            "description": "Delivery address"
          },
          "city_delivery": {
            "type": "string",
            "description": "Delivery city"
          },
          "zipcode_delivery": {
            "type": "string",
            "description": "Delivery zip code"
          },
          "id_country_delivery": {
            "type": "string",
            "description": "Delivery country identifier"
          }
        },
        "title": "PurchaseDraftOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Drafts\\DTOs\\PurchaseDraftOutputDTO"
      },
      "CreatePurchaseDocumentDTO": {
        "type": "object",
        "properties": {
          "document_number": {
            "type": "string"
          },
          "document": {
            "type": "object"
          },
          "lines": {
            "type": "array"
          }
        },
        "title": "CreatePurchaseDocumentDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\DTOs\\Documents\\CreatePurchaseDocumentDTO"
      },
      "ClosePurchaseDocumentLinesDTO": {
        "type": "object",
        "properties": {
          "closed": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Line numbers closed by this request."
          },
          "rejected": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "line": {
                  "type": "integer"
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "not_found",
                    "not_article",
                    "no_pending_quantity"
                  ]
                }
              }
            },
            "description": "Requested lines that were not closed, with the reason."
          },
          "document_closed": {
            "type": "boolean",
            "description": "True when this request closed the document header."
          }
        },
        "title": "ClosePurchaseDocumentLinesDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\DTOs\\Documents\\ClosePurchaseDocumentLinesDTO"
      },
      "AbsenceOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "apply_date": {
            "type": "string",
            "format": "date"
          },
          "employee_id": {
            "type": "integer"
          },
          "type_id": {
            "type": "integer"
          },
          "value": {
            "type": "number"
          },
          "processed": {
            "type": "boolean"
          }
        },
        "title": "AbsenceOutputDTO",
        "x-og-fqcn": "Og\\Modules\\RHumanos\\Absences\\DTOs\\AbsenceOutputDTO"
      },
      "VacationOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "employee_id": {
            "type": "integer"
          },
          "half_day": {
            "type": "boolean"
          }
        },
        "title": "VacationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\RHumanos\\Vacations\\DTOs\\VacationOutputDTO"
      },
      "ProcessOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Process identifier"
          },
          "entity_type": {
            "type": "string",
            "description": "C for customer, F for supplier"
          },
          "type": {
            "type": "string",
            "description": "R for return, W for warranty"
          },
          "status_id": {
            "type": "integer"
          },
          "status_description": {
            "type": "string",
            "nullable": true
          },
          "customer_id": {
            "type": "integer",
            "nullable": true
          },
          "supplier_id": {
            "type": "integer",
            "nullable": true
          },
          "entity_name": {
            "type": "string",
            "nullable": true,
            "description": "Customer or supplier name, per entity_type"
          },
          "reference": {
            "type": "string",
            "description": "Article code"
          },
          "article_description": {
            "type": "string",
            "nullable": true
          },
          "reference_nc": {
            "type": "string",
            "nullable": true,
            "description": "Credit note reference"
          },
          "reason_id": {
            "type": "integer",
            "nullable": true
          },
          "reason_description": {
            "type": "string",
            "nullable": true
          },
          "plate": {
            "type": "string",
            "nullable": true
          },
          "vin": {
            "type": "string",
            "nullable": true
          },
          "damage": {
            "type": "string",
            "nullable": true
          },
          "installation_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "fault_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "kms_traveled": {
            "type": "integer",
            "nullable": true
          },
          "kms_current": {
            "type": "integer",
            "nullable": true
          },
          "observations": {
            "type": "string",
            "nullable": true
          },
          "document_type": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "integer",
            "nullable": true
          },
          "document_line": {
            "type": "integer",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "nullable": true
          },
          "quantity_accepted": {
            "type": "number"
          },
          "quantity_refused": {
            "type": "number"
          },
          "selling_price": {
            "type": "number"
          },
          "origin": {
            "type": "string",
            "description": "Creation channel: user or api"
          },
          "created_by_id": {
            "type": "integer",
            "nullable": true,
            "description": "Employee that registered the process"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_by_id": {
            "type": "integer",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "ProcessOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Rwm\\DTO\\Processes\\ProcessOutputDTO"
      },
      "CreateReceiptDTO": {
        "type": "object",
        "properties": {
          "document_number": {
            "type": "integer"
          },
          "lines": {
            "type": "array"
          }
        },
        "title": "CreateReceiptDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Receipts\\DTOs\\CreateReceiptDTO"
      },
      "CreateSaleDocumentDTO": {
        "type": "object",
        "properties": {
          "document_number": {
            "type": "string"
          },
          "document": {
            "type": "object"
          },
          "lines": {
            "type": "array"
          }
        },
        "title": "CreateSaleDocumentDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Documents\\DTOs\\CreateSaleDocumentDTO"
      },
      "DocumentValidationLineOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "line": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "extra_description": {
            "type": "string"
          },
          "has_lot": {
            "type": "boolean"
          },
          "lot": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "qty_doc": {
            "type": "number"
          },
          "qty_read": {
            "type": "number"
          },
          "qty_real_read": {
            "type": "number"
          },
          "qty_diff": {
            "type": "number"
          },
          "qty_fact": {
            "type": "number"
          },
          "qty_pend": {
            "type": "number"
          },
          "barcodes": {
            "type": "array"
          },
          "stock": {
            "type": "number"
          },
          "id_sector": {
            "type": "string",
            "x-og-conditional": true
          },
          "desc_sector": {
            "type": "string",
            "x-og-conditional": true
          },
          "bc_sector": {
            "type": "string",
            "x-og-conditional": true
          }
        },
        "title": "DocumentValidationLineOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\DocumentValidation\\DTOs\\DocumentValidationLineOutputDTO"
      },
      "DocumentValidationOutputDTO": {
        "type": "object",
        "properties": {
          "document_number": {
            "type": "string"
          },
          "serie": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "customer_id": {
            "type": "string"
          },
          "customer_name": {
            "type": "string"
          },
          "customer_tax_id": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "date": {
            "type": "string"
          },
          "purchase": {
            "type": "boolean"
          },
          "missing": {
            "type": "number"
          },
          "excess": {
            "type": "number"
          },
          "validated": {
            "type": "integer"
          }
        },
        "title": "DocumentValidationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\DocumentValidation\\DTOs\\DocumentValidationOutputDTO"
      },
      "DocumentValidationLinesListOutputDTO": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentValidationLineOutputDTO"
            }
          },
          "total": {
            "type": "integer"
          },
          "document": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentValidationOutputDTO"
              }
            ],
            "x-og-conditional": true
          },
          "missing": {
            "type": "number",
            "x-og-conditional": true
          },
          "excess": {
            "type": "number",
            "x-og-conditional": true
          },
          "validated": {
            "type": "integer",
            "x-og-conditional": true
          },
          "in_document": {
            "type": "boolean",
            "x-og-conditional": true
          }
        },
        "title": "DocumentValidationLinesListOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\DocumentValidation\\DTOs\\DocumentValidationLinesListOutputDTO"
      },
      "GetDraftDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "serie": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "general_type": {
            "type": "string"
          },
          "type_description": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "customer_tax_id": {
            "type": "string"
          },
          "vat_number": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "system_date": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "discount_2": {
            "type": "number"
          },
          "discount_value": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "number"
          },
          "exchange_rate_date": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "observations": {
            "type": "string"
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "address_invoice_id": {
            "type": "string"
          },
          "invoice_address": {
            "type": "string"
          },
          "invoice_city": {
            "type": "string"
          },
          "invoice_zipcode": {
            "type": "string"
          },
          "invoice_country": {
            "type": "string"
          },
          "delivery_address": {
            "type": "string"
          },
          "delivery_city": {
            "type": "string"
          },
          "delivery_zipcode": {
            "type": "string"
          },
          "delivery_country": {
            "type": "string"
          },
          "address_shipping_id": {
            "type": "string"
          },
          "load_address": {
            "type": "string"
          },
          "load_city": {
            "type": "string"
          },
          "load_zipcode": {
            "type": "string"
          },
          "load_country": {
            "type": "string"
          },
          "vehicle": {
            "type": "string"
          },
          "canceled": {
            "type": "boolean"
          },
          "date_state": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "plate": {
            "type": "string",
            "x-og-conditional": true
          },
          "pdf": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        },
        "title": "GetDraftDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Documents\\DTOs\\GetDraftDTO"
      },
      "DocDraftLiteOutputDTO": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "dtype": {
            "type": "string"
          },
          "number": {
            "type": "string"
          }
        },
        "title": "DocDraftLiteOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Others\\DTOs\\DocDraftLiteOutputDTO"
      },
      "ArticleOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique article identifier (code)"
          },
          "description": {
            "type": "string",
            "description": "Article name/description"
          },
          "article_type": {
            "type": "string",
            "description": "Article type (product, service, etc.)"
          },
          "purchasing_price": {
            "type": "number",
            "description": "Cost/purchase price"
          },
          "selling_price": {
            "type": "number",
            "description": "Selling/venda price"
          },
          "vat_id": {
            "type": "string",
            "description": "VAT rate ID"
          },
          "measurement_unit_id": {
            "type": "string",
            "description": "Measurement unit code"
          },
          "stock_quantity": {
            "type": "number",
            "description": "Current stock quantity"
          },
          "family_id": {
            "type": "string",
            "description": "Family/article group ID"
          },
          "sub_family_id": {
            "type": "string",
            "description": "Sub-family ID"
          },
          "sub_sub_family_id": {
            "type": "string",
            "description": "Sub-sub-family ID"
          },
          "barcode": {
            "type": "string",
            "description": "Main barcode"
          },
          "brand_id": {
            "type": "string",
            "description": "Brand ID"
          },
          "brand": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "Whether article is active"
          },
          "active_for_web": {
            "type": "boolean",
            "description": "Whether article is visible on web"
          },
          "re": {
            "type": "string",
            "description": "Exemption reason code (IVA)"
          },
          "set": {
            "type": "string",
            "description": "Set/conjunto code"
          },
          "part_number": {
            "type": "string",
            "description": "Manufacturer part number"
          },
          "purchasing_price_last": {
            "type": "number",
            "description": "Last purchase price"
          },
          "purchasing_price_avg": {
            "type": "number",
            "description": "Average purchase price"
          },
          "margin": {
            "type": "number",
            "description": "Profit margin percentage"
          },
          "selling_price_option": {
            "type": "string",
            "description": "Selling price option"
          },
          "margin_pcu": {
            "type": "number",
            "description": "Unit cost margin"
          },
          "margin_pcu_type": {
            "type": "string",
            "description": "Margin type (value or percentage)"
          },
          "discount_classif": {
            "type": "string",
            "description": "Discount classification"
          },
          "commission_rate": {
            "type": "number",
            "description": "Commission rate"
          },
          "barcode_prefix": {
            "type": "string",
            "description": "Barcode prefix"
          },
          "sale_multiples": {
            "type": "number",
            "description": "Sale multiple quantities"
          },
          "use_lots": {
            "type": "boolean",
            "description": "Uses lot tracking"
          },
          "use_serial_numbers": {
            "type": "boolean",
            "description": "Uses serial number tracking"
          },
          "manufactured": {
            "type": "boolean",
            "description": "Is manufactured in-house"
          },
          "withholding_tax": {
            "type": "boolean",
            "description": "Subject to withholding tax"
          },
          "customs_duty_rate": {
            "type": "number",
            "description": "Customs duty percentage"
          },
          "location": {
            "type": "string",
            "description": "Storage location"
          },
          "discount": {
            "type": "number",
            "description": "Default discount percentage"
          },
          "energy_class": {
            "type": "string",
            "description": "Energy efficiency class"
          },
          "abbreviation": {
            "type": "string",
            "description": "Short name/abbreviation"
          },
          "saft_product_type": {
            "type": "string",
            "description": "SAF-T product type"
          },
          "saft_product_category": {
            "type": "string",
            "description": "SAF-T product category"
          },
          "ordered_qty_client": {
            "type": "number",
            "description": "Ordered quantity (clients)"
          },
          "ordered_qty_supplier": {
            "type": "number",
            "description": "Ordered quantity (suppliers)"
          },
          "stock_min": {
            "type": "number",
            "description": "Minimum stock level"
          },
          "stock_max": {
            "type": "number",
            "description": "Maximum stock level"
          },
          "qty_vehicle": {
            "type": "number",
            "description": "Quantity per vehicle"
          },
          "qty_pallet": {
            "type": "number",
            "description": "Quantity per pallet"
          },
          "qty_box": {
            "type": "number",
            "description": "Quantity per box"
          },
          "codx": {
            "type": "string",
            "description": "Cross-reference code X"
          },
          "cody": {
            "type": "string",
            "description": "Cross-reference code Y"
          },
          "codz": {
            "type": "string",
            "description": "Cross-reference code Z"
          },
          "image_link": {
            "type": "string",
            "description": "Article image URL",
            "nullable": true
          },
          "spaces_dimensions": {
            "type": "string",
            "description": "Dimensions type"
          },
          "id_spaces_dimensions": {
            "type": "string",
            "description": "Dimensions ID"
          },
          "dimensions": {
            "type": "string",
            "description": "Dimensions string",
            "nullable": true
          },
          "is_component": {
            "type": "boolean",
            "description": "Is a component"
          },
          "component_brand": {
            "type": "string",
            "description": "Component brand"
          },
          "component_model": {
            "type": "string",
            "description": "Component model"
          },
          "component_version": {
            "type": "string",
            "description": "Component version"
          },
          "manually_updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last manual update"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          }
        },
        "title": "ArticleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleOutputDTO"
      },
      "ArticlePhotoOutputDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string",
            "description": "Article code",
            "example": "ART001"
          },
          "image_url": {
            "type": "string",
            "description": "Public URL of the stored image",
            "example": "https://host/loadupload/artigos/_ART001.jpg"
          },
          "stored_at": {
            "type": "string",
            "format": "date-time",
            "description": "Storage timestamp in ISO-8601 UTC",
            "example": "2026-04-17T10:30:00Z"
          }
        },
        "title": "ArticlePhotoOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticlePhotoOutputDTO"
      },
      "ArticleLotDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "entry_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "expiration_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "warehouse_id": {
            "type": "string",
            "nullable": true
          },
          "stock": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "ArticleLotDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleLotDTO"
      },
      "ArticleComplementaryDTO": {
        "type": "object",
        "properties": {
          "complementary_id": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "extra_description": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "multiple_quantity": {
            "type": "boolean"
          },
          "complementary_price": {
            "type": "number",
            "nullable": true
          }
        },
        "title": "ArticleComplementaryDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleComplementaryDTO"
      },
      "Brand": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "observations": {
            "type": "string",
            "nullable": true
          },
          "is_exclusive": {
            "type": "boolean"
          },
          "min_profit_margin": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "Brand",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Brands\\Models\\Brand"
      },
      "FamilyOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tpv_active": {
            "type": "string",
            "nullable": true
          },
          "commission_percentage": {
            "type": "number",
            "nullable": true
          },
          "min_profit_margin": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "FamilyOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Families\\DTOs\\FamilyOutputDTO"
      },
      "SubFamilyOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "family_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "tpv_active": {
            "type": "string",
            "nullable": true
          },
          "commission_percentage": {
            "type": "number",
            "nullable": true
          },
          "min_profit_margin": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "SubFamilyOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Families\\DTOs\\SubFamilyOutputDTO"
      },
      "SubSubFamilyOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sub_family_id": {
            "type": "string"
          },
          "family_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "tpv_active": {
            "type": "string",
            "nullable": true
          },
          "commission_percentage": {
            "type": "number",
            "nullable": true
          },
          "min_profit_margin": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "SubSubFamilyOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Families\\DTOs\\SubSubFamilyOutputDTO"
      },
      "MeasurementUnit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "MeasurementUnit",
        "x-og-fqcn": "Og\\Modules\\Stocks\\MeasurementUnits\\Models\\MeasurementUnit"
      },
      "ArticlePriceTable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "article_id": {
            "type": "string",
            "nullable": true
          },
          "classification_id": {
            "type": "string",
            "nullable": true
          },
          "payment_method_id": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number"
          },
          "discount_perc": {
            "type": "number",
            "nullable": true
          },
          "discount_perc2": {
            "type": "number",
            "nullable": true
          },
          "discount_perc3": {
            "type": "number",
            "nullable": true
          },
          "discount_perc4": {
            "type": "number",
            "nullable": true
          },
          "discount_perc5": {
            "type": "number",
            "nullable": true
          },
          "discount_type": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_by": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_by": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "ArticlePriceTable",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\Models\\ArticlePriceTable"
      },
      "StockMovementShowOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Movement identifier"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Movement description"
          },
          "movement_type": {
            "type": "object",
            "nullable": true,
            "description": "Movement type"
          },
          "warehouse_enter": {
            "type": "object",
            "nullable": true,
            "description": "Entry warehouse"
          },
          "warehouse_exit": {
            "type": "object",
            "nullable": true,
            "description": "Exit warehouse"
          },
          "annulled": {
            "type": "boolean",
            "description": "Whether the movement is annulled"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Movement date"
          },
          "register_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Registration date"
          },
          "lines": {
            "type": "array",
            "description": "Movement lines",
            "items": {
              "type": "object",
              "properties": {
                "id_movement": {
                  "type": "string",
                  "description": "Movement identifier this line belongs to"
                },
                "line": {
                  "type": "integer",
                  "description": "Line number within the movement"
                },
                "article": {
                  "type": "string",
                  "nullable": true,
                  "description": "Article code"
                },
                "designation": {
                  "type": "string",
                  "nullable": true,
                  "description": "Article designation"
                },
                "warehouse_enter": {
                  "type": "object",
                  "nullable": true,
                  "description": "Entry warehouse"
                },
                "warehouse_exit": {
                  "type": "object",
                  "nullable": true,
                  "description": "Exit warehouse"
                },
                "quantity": {
                  "type": "number",
                  "nullable": true,
                  "description": "Quantity moved"
                },
                "unit": {
                  "type": "string",
                  "nullable": true,
                  "description": "Measurement unit code"
                },
                "price_uni": {
                  "type": "number",
                  "nullable": true,
                  "description": "Unit price"
                },
                "cost_price_last": {
                  "type": "number",
                  "nullable": true,
                  "description": "Last cost price"
                },
                "cost_price_medium": {
                  "type": "number",
                  "nullable": true,
                  "description": "Average cost price"
                },
                "cost_price": {
                  "type": "number",
                  "nullable": true,
                  "description": "Standard cost price"
                },
                "cost_center": {
                  "type": "string",
                  "nullable": true,
                  "description": "Cost center code"
                }
              }
            }
          }
        },
        "title": "StockMovementShowOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Movements\\DTOs\\StockMovementShowOutputDTO"
      },
      "LabelTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "layout_file": {
            "type": "string",
            "nullable": true
          },
          "json_layout": {
            "type": "string",
            "nullable": true
          },
          "width": {
            "type": "number",
            "nullable": true
          },
          "height": {
            "type": "number",
            "nullable": true
          },
          "margin_left": {
            "type": "number",
            "nullable": true
          },
          "margin_top": {
            "type": "number",
            "nullable": true
          },
          "barcode_type": {
            "type": "string",
            "nullable": true
          },
          "orientation": {
            "type": "string",
            "nullable": true
          },
          "sort_order": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "LabelTemplate",
        "x-og-fqcn": "Og\\Modules\\Stocks\\LabelTemplates\\Models\\LabelTemplate"
      },
      "DocumentSerieOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Serie number (primary key)"
          },
          "name": {
            "type": "string",
            "description": "Serie description"
          },
          "series_type": {
            "type": "string",
            "description": "Serie type (N=Normal, A=Cancelled)"
          },
          "series_format": {
            "type": "string",
            "description": "Impression format"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true,
            "description": "Final customer ID"
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Limit date"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the serie is active"
          },
          "year": {
            "type": "integer",
            "nullable": true,
            "description": "Year"
          },
          "establishment_number": {
            "type": "string",
            "nullable": true,
            "description": "Establishment number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "DocumentSerieOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\DocumentSeries\\DTOs\\DocumentSerieOutputDTO"
      },
      "ActivitySectorOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Activity sector identifier"
          },
          "description": {
            "type": "string",
            "description": "Activity sector name"
          }
        },
        "title": "ActivitySectorOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Crm\\ActivitySectors\\DTOs\\ActivitySectorOutputDTO"
      },
      "TicketHeaderOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "user_type": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "integer",
            "nullable": true
          },
          "dept_id": {
            "type": "integer",
            "nullable": true
          },
          "status_id": {
            "type": "integer",
            "nullable": true
          },
          "status": {
            "type": "object",
            "nullable": true
          },
          "priority_id": {
            "type": "integer",
            "nullable": true
          },
          "priority": {
            "type": "object",
            "nullable": true
          },
          "assignee_id": {
            "type": "integer",
            "nullable": true
          },
          "subscription_id": {
            "type": "integer",
            "nullable": true
          },
          "document_type": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "integer",
            "nullable": true
          },
          "is_trash": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_reply_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "closed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sla_id": {
            "type": "integer",
            "nullable": true
          },
          "sla_first_reply_due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "First reply (TPR) deadline of the current cycle."
          },
          "sla_resolution_due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Resolution (TTR) deadline of the current cycle."
          },
          "sla_next_update_due_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Deadline of the running status-update round (TER)."
          },
          "sla_first_reply_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sla_first_reply_met": {
            "type": "boolean",
            "nullable": true,
            "description": "Null until the first reply is judged."
          },
          "sla_resolution_met": {
            "type": "boolean",
            "nullable": true,
            "description": "Null until the cycle is resolved."
          },
          "sla_paused_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Start of the running pause; null when not paused."
          },
          "sla_paused_total_minutes": {
            "type": "integer",
            "description": "Business minutes paused in the current cycle."
          },
          "sla_cycle_no": {
            "type": "integer"
          },
          "sla_update_round": {
            "type": "integer"
          },
          "sla_first_reply_remaining_seconds": {
            "type": "integer",
            "nullable": true,
            "description": "Business seconds left on the TPR clock, negative once overdue; null when the clock is not running. Not returned by bulk-headers or update."
          },
          "sla_first_reply_band": {
            "type": "string",
            "enum": [
              "green",
              "yellow",
              "orange",
              "red",
              "grey"
            ],
            "nullable": true,
            "description": "Colour band of the TPR clock; null when the clock is not running."
          },
          "sla_resolution_remaining_seconds": {
            "type": "integer",
            "nullable": true,
            "description": "Business seconds left on the TTR clock, frozen at sla_paused_at while paused, negative once overdue; null when the clock is not running."
          },
          "sla_resolution_band": {
            "type": "string",
            "enum": [
              "green",
              "yellow",
              "orange",
              "red",
              "grey"
            ],
            "nullable": true,
            "description": "Colour band of the TTR clock, grey while paused; null when the clock is not running."
          },
          "sla_next_update_remaining_seconds": {
            "type": "integer",
            "nullable": true,
            "description": "Business seconds left on the TER clock, frozen while paused at sla_paused_at or at the start of a round opened during the pause, negative once overdue; null when the clock is not running."
          },
          "sla_next_update_band": {
            "type": "string",
            "enum": [
              "green",
              "yellow",
              "orange",
              "red",
              "grey"
            ],
            "nullable": true,
            "description": "Colour band of the TER clock, grey while paused; null when the clock is not running."
          }
        },
        "title": "TicketHeaderOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\TicketHeaderOutputDTO"
      },
      "CreateTicketOutputDTO": {
        "type": "object",
        "properties": {
          "ticket_id": {
            "type": "integer"
          },
          "post_id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          }
        },
        "title": "CreateTicketOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\CreateTicketOutputDTO"
      },
      "TicketReplyOutputDTO": {
        "type": "object",
        "properties": {
          "post_id": {
            "type": "integer"
          },
          "ticket_id": {
            "type": "integer"
          }
        },
        "title": "TicketReplyOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\TicketReplyOutputDTO"
      },
      "TicketNoteOutputDTO": {
        "type": "object",
        "properties": {
          "note_id": {
            "type": "integer"
          },
          "ticket_id": {
            "type": "integer"
          }
        },
        "title": "TicketNoteOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\TicketNoteOutputDTO"
      },
      "TicketPublicLinkOutputDTO": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string"
          }
        },
        "title": "TicketPublicLinkOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\TicketPublicLinkOutputDTO"
      },
      "SendSmsDTO": {
        "type": "object",
        "title": "SendSmsDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\SendSmsDTO"
      },
      "SendEmailDTO": {
        "type": "object",
        "title": "SendEmailDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\SendEmailDTO"
      },
      "ProcessGuideDocumentOutputDTO": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "description": "Document number"
          },
          "document_date": {
            "type": "string",
            "description": "Document date"
          },
          "document_barcode": {
            "type": "string",
            "description": "Document barcode"
          },
          "entity_code": {
            "type": "string",
            "description": "Billing entity code"
          },
          "route": {
            "type": "string",
            "nullable": true,
            "description": "Customer route"
          },
          "lines": {
            "type": "array",
            "description": "Document lines",
            "items": {
              "type": "object",
              "properties": {
                "article_code": {
                  "type": "string",
                  "description": "Article code"
                },
                "document_stamp": {
                  "type": "string",
                  "description": "Document stamp identifier"
                },
                "quantity": {
                  "type": "number",
                  "description": "Line quantity"
                },
                "type": {
                  "type": "string",
                  "nullable": true,
                  "description": "Process type label"
                },
                "warehouse_code": {
                  "type": "string",
                  "nullable": true,
                  "description": "Warehouse code"
                }
              }
            }
          }
        },
        "title": "ProcessGuideDocumentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Rwm\\DTO\\ProcessDocuments\\ProcessGuideDocumentOutputDTO"
      },
      "PreLoginOutputDTO": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "demo": {
            "type": "boolean"
          },
          "license": {
            "type": "object",
            "properties": {
              "active": {
                "type": "boolean"
              }
            }
          },
          "areas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "icon": {
                  "type": "string"
                },
                "panel": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "panel_keyboard": {
            "type": "boolean"
          },
          "companies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "package": {
                  "type": "string"
                },
                "logo_url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "current": {
                  "type": "boolean"
                }
              }
            }
          },
          "branding": {
            "type": "object",
            "properties": {
              "default_theme": {
                "type": "string",
                "enum": [
                  "light",
                  "dark"
                ]
              },
              "background_color": {
                "type": "string"
              },
              "favicon_url": {
                "type": "string",
                "format": "uri"
              },
              "copyright_html": {
                "type": "string"
              },
              "social_buttons_html": {
                "type": "string"
              },
              "light": {
                "type": "object",
                "properties": {
                  "logo_url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "background_url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "dark": {
                "type": "object",
                "properties": {
                  "logo_url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "background_url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          },
          "sso": {
            "type": "object",
            "properties": {
              "microsoft": {
                "type": "object",
                "properties": {
                  "available": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "title": "PreLoginOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Auth\\Api\\DTOs\\PreLoginOutputDTO"
      },
      "OpportunityOptionOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Business opportunity code, sent as business_opportunity_id when creating an appointment",
            "example": "OPN2026001"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Business opportunity designation",
            "example": "Renovacao de frota"
          },
          "phase": {
            "type": "string",
            "nullable": true,
            "description": "Designation of the current sales cycle phase",
            "example": "Proposta"
          },
          "campaign_id": {
            "type": "string",
            "nullable": true,
            "description": "Code of the campaign the opportunity came from",
            "example": "CAMP2026"
          },
          "entity_type": {
            "type": "string",
            "nullable": true,
            "description": "Entity type (C=Customer, F=Supplier, P=Prospect, R=Seller, E=Employee, T=Contact, Z=Common)",
            "example": "C"
          },
          "entity_id": {
            "type": "integer",
            "description": "Entity identifier",
            "example": 22
          }
        },
        "title": "OpportunityOptionOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Crm\\Opportunities\\DTOs\\OpportunityOptionOutputDTO"
      },
      "CampaignOptionOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Campaign code, sent as campaign_id when creating an appointment",
            "example": "CAMP2026"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Campaign designation",
            "example": "Campanha de outono"
          }
        },
        "title": "CampaignOptionOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Crm\\Campaigns\\DTOs\\CampaignOptionOutputDTO"
      },
      "TaskNoteOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          }
        },
        "title": "TaskNoteOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Crm\\Tasks\\DTOs\\TaskNoteOutputDTO"
      },
      "InvoiceOcrResultOutputDTO": {
        "type": "object",
        "properties": {
          "ocr_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "completed",
              "failed"
            ]
          },
          "error_message": {
            "type": "string",
            "nullable": true,
            "description": "Only present when status is failed"
          },
          "supplier": {
            "type": "object",
            "nullable": true,
            "description": "Only present when status is completed"
          },
          "document": {
            "type": "object",
            "nullable": true,
            "description": "Only present when status is completed"
          },
          "lines": {
            "type": "array",
            "description": "Only present when status is completed"
          }
        },
        "title": "InvoiceOcrResultOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Dms\\Ocr\\DTOs\\InvoiceOcrResultOutputDTO"
      },
      "EcovalueMovementOutputDTO": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string"
          },
          "article_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_document_number": {
            "type": "string"
          },
          "document_number": {
            "type": "integer"
          },
          "operation_type": {
            "type": "string"
          },
          "is_purchase": {
            "type": "string"
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "quantity": {
            "type": "number"
          },
          "warehouse_id": {
            "type": "string",
            "nullable": true
          },
          "warehouse_name": {
            "type": "string",
            "nullable": true
          },
          "unit_price": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "running_quantity": {
            "type": "number",
            "nullable": true
          }
        },
        "title": "EcovalueMovementOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EVM\\DTOs\\EcovalueMovementOutputDTO"
      },
      "CustomerEcovalueArticleOutputDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "entry_quantity": {
            "type": "number"
          },
          "entry_total_without_vat": {
            "type": "number"
          },
          "exit_quantity": {
            "type": "number"
          },
          "exit_total_without_vat": {
            "type": "number"
          }
        },
        "title": "CustomerEcovalueArticleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EVM\\DTOs\\CustomerEcovalueArticleOutputDTO"
      },
      "ArticleEcovalueCustomerOutputDTO": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string"
          },
          "entry_quantity": {
            "type": "number"
          },
          "entry_total_without_vat": {
            "type": "number"
          },
          "exit_quantity": {
            "type": "number"
          },
          "exit_total_without_vat": {
            "type": "number"
          }
        },
        "title": "ArticleEcovalueCustomerOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EVM\\DTOs\\ArticleEcovalueCustomerOutputDTO"
      },
      "ArticleEcovalueWarehouseOutputDTO": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "string"
          },
          "warehouse_name": {
            "type": "string"
          },
          "entry_quantity": {
            "type": "number"
          },
          "entry_total_without_vat": {
            "type": "number"
          },
          "exit_quantity": {
            "type": "number"
          },
          "exit_total_without_vat": {
            "type": "number"
          }
        },
        "title": "ArticleEcovalueWarehouseOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EVM\\DTOs\\ArticleEcovalueWarehouseOutputDTO"
      },
      "CustomerEcovalueMovementOutputDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_document_number": {
            "type": "string"
          },
          "document_number": {
            "type": "integer"
          },
          "operation_type": {
            "type": "string"
          },
          "is_purchase": {
            "type": "string"
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "quantity": {
            "type": "number"
          },
          "warehouse_id": {
            "type": "string",
            "nullable": true
          },
          "warehouse_description": {
            "type": "string",
            "nullable": true
          },
          "unit_price": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "running_quantity": {
            "type": "number",
            "nullable": true
          }
        },
        "title": "CustomerEcovalueMovementOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EVM\\DTOs\\CustomerEcovalueMovementOutputDTO"
      },
      "ArticleEcovalueMovementOutputDTO": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string"
          },
          "display_document_number": {
            "type": "string"
          },
          "document_number": {
            "type": "integer"
          },
          "operation_type": {
            "type": "string"
          },
          "is_purchase": {
            "type": "string"
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "quantity": {
            "type": "number"
          },
          "warehouse_id": {
            "type": "string",
            "nullable": true
          },
          "warehouse_name": {
            "type": "string",
            "nullable": true
          },
          "unit_price": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          }
        },
        "title": "ArticleEcovalueMovementOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EVM\\DTOs\\ArticleEcovalueMovementOutputDTO"
      },
      "LookupOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Lookup value identifier"
          },
          "description": {
            "type": "string",
            "description": "Lookup value description"
          },
          "color": {
            "type": "string",
            "description": "Optional color hint (e.g. danger, success, warning)",
            "nullable": true
          }
        },
        "title": "LookupOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\LookupOutputDTO"
      },
      "CategoryOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Category identifier"
          },
          "description": {
            "type": "string",
            "description": "Category name"
          }
        },
        "title": "CategoryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\CategoryOutputDTO"
      },
      "PartComponentOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Component identifier"
          },
          "description": {
            "type": "string",
            "description": "Component name"
          },
          "category_id": {
            "type": "integer",
            "description": "Parent category ID"
          },
          "article_code": {
            "type": "string",
            "description": "Associated article code"
          },
          "value": {
            "type": "number",
            "description": "Component value"
          },
          "category": {
            "type": "object",
            "description": "Parent category details"
          }
        },
        "title": "PartComponentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\PartComponentOutputDTO"
      },
      "SectorOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Sector identifier"
          },
          "description": {
            "type": "string",
            "description": "Sector name"
          },
          "barcode": {
            "type": "string",
            "description": "Sector barcode"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the sector is active"
          },
          "warehouse_id": {
            "type": "string",
            "description": "Warehouse code"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "SectorOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Organizational\\Sectors\\DTOs\\SectorOutputDTO"
      },
      "ChecklistOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Checklist item identifier"
          },
          "description": {
            "type": "string",
            "description": "Checklist item description"
          },
          "default_value": {
            "type": "integer",
            "description": "Default conformity value",
            "nullable": true
          },
          "sort_order": {
            "type": "integer",
            "description": "Display order"
          },
          "value": {
            "type": "integer",
            "description": "Current conformity value for the process",
            "nullable": true
          },
          "value_description": {
            "type": "string",
            "description": "Description of the conformity value",
            "nullable": true
          }
        },
        "title": "ChecklistOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\ChecklistOutputDTO"
      },
      "ChecklistValueOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Conformity value identifier"
          },
          "description": {
            "type": "string",
            "description": "Conformity value description"
          }
        },
        "title": "ChecklistValueOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\ChecklistValueOutputDTO"
      },
      "DismantlementOutputDTO": {
        "type": "object",
        "properties": {
          "process": {
            "type": "object",
            "description": "Process summary"
          },
          "vehicle": {
            "type": "object",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "description": "Categories with nested components",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "description": {
                  "type": "string"
                },
                "checked_status": {
                  "type": "integer",
                  "description": "1=all checked, 2=partial"
                },
                "components_count": {
                  "type": "integer"
                },
                "components": {
                  "type": "array"
                }
              }
            }
          }
        },
        "title": "DismantlementOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\DismantlementOutputDTO"
      },
      "EcoAuto__ProcessOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Process identifier"
          },
          "process_code": {
            "type": "string",
            "description": "Internal process code"
          },
          "plate": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "status": {
            "type": "string",
            "description": "Process status code"
          },
          "type": {
            "type": "integer",
            "description": "Process type"
          },
          "barcode": {
            "type": "string",
            "description": "Process barcode",
            "nullable": true
          },
          "is_deleted": {
            "type": "boolean"
          },
          "test_checklist": {
            "type": "boolean"
          },
          "sector_id": {
            "type": "integer",
            "nullable": true
          },
          "operator_code": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "vehicle": {
            "type": "object",
            "description": "Vehicle summary",
            "nullable": true
          },
          "sector": {
            "type": "object",
            "description": "Sector details",
            "nullable": true
          }
        },
        "title": "ProcessOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\ProcessOutputDTO"
      },
      "VehicleLookupOutputDTO": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "brand": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "version": {
            "type": "string",
            "nullable": true
          },
          "fuel": {
            "type": "string",
            "nullable": true
          },
          "brand_id": {
            "type": "integer",
            "nullable": true
          },
          "model_id": {
            "type": "integer",
            "nullable": true
          },
          "version_id": {
            "type": "integer",
            "nullable": true
          },
          "fuel_id": {
            "type": "integer",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "nullable": true
          },
          "doors": {
            "type": "integer",
            "nullable": true
          },
          "chassis": {
            "type": "string",
            "nullable": true
          },
          "kms": {
            "type": "integer",
            "nullable": true
          },
          "power": {
            "type": "integer",
            "nullable": true
          },
          "engine_code": {
            "type": "string",
            "nullable": true
          },
          "has_active_process": {
            "type": "boolean"
          },
          "active_process_id": {
            "type": "integer",
            "nullable": true
          }
        },
        "title": "VehicleLookupOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\VehicleLookupOutputDTO"
      },
      "CustomerSearchOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 123
          },
          "name": {
            "type": "string",
            "example": "Empresa Exemplo Lda"
          },
          "tax_id": {
            "type": "string",
            "example": "123456789"
          },
          "type": {
            "type": "string",
            "enum": [
              "E",
              "I",
              "P"
            ]
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "Rua das Flores, 123"
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "Lisboa"
          },
          "district_id": {
            "type": "integer",
            "nullable": true,
            "example": 11
          },
          "postal_code": {
            "type": "string",
            "nullable": true,
            "example": "1000-001"
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "example": "PT"
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "example": "213456789"
          },
          "phone2": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "contacto@empresa.pt"
          },
          "webpage": {
            "type": "string",
            "nullable": true
          },
          "vendor_code": {
            "type": "integer",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "example": true
          },
          "entity_type": {
            "type": "string",
            "nullable": true
          },
          "classification_code": {
            "type": "string",
            "nullable": true
          },
          "campaign_code": {
            "type": "integer",
            "nullable": true
          },
          "gdpr_data_processing_date": {
            "type": "string",
            "nullable": true
          },
          "gdpr_allow_mailing": {
            "type": "boolean",
            "nullable": true
          },
          "activity_sector_id": {
            "type": "integer",
            "nullable": true
          },
          "client_manager_id": {
            "type": "integer",
            "nullable": true
          },
          "exemption_reason_id": {
            "type": "integer",
            "nullable": true
          },
          "latitude": {
            "type": "string",
            "nullable": true,
            "example": "38.7169"
          },
          "longitude": {
            "type": "string",
            "nullable": true,
            "example": "-9.1399"
          }
        },
        "title": "CustomerSearchOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\CustomerSearchOutputDTO"
      },
      "ExtraFieldOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "group_id": {
            "type": "integer",
            "nullable": true
          },
          "group": {
            "type": "object",
            "nullable": true
          },
          "value": {
            "type": "object",
            "nullable": true
          },
          "values": {
            "type": "array",
            "nullable": true
          },
          "type": {
            "type": "integer",
            "nullable": true
          },
          "type_description": {
            "type": "string",
            "nullable": true
          },
          "t_min": {
            "type": "integer",
            "nullable": true
          },
          "t_max": {
            "type": "integer",
            "nullable": true
          },
          "when_ask": {
            "type": "string",
            "nullable": true
          },
          "show_in_bill": {
            "type": "boolean",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "ExtraFieldOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Settings\\ExtraFields\\DTOs\\ExtraFieldOutputDTO"
      },
      "CustomerMovementOutputDTO": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "document_type": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "amount_paid": {
            "type": "number",
            "nullable": true
          },
          "debit": {
            "type": "number"
          },
          "credit": {
            "type": "number"
          },
          "balance": {
            "type": "number",
            "nullable": true
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "delivery_address": {
            "type": "string",
            "nullable": true
          },
          "delivery_city": {
            "type": "string",
            "nullable": true
          },
          "delivery_zipcode": {
            "type": "string",
            "nullable": true
          },
          "delivery_country": {
            "type": "string",
            "nullable": true
          },
          "is_receipt": {
            "type": "boolean",
            "nullable": true
          },
          "total_without_vat": {
            "type": "number",
            "nullable": true
          },
          "vat_value": {
            "type": "number",
            "nullable": true
          },
          "total": {
            "type": "number",
            "nullable": true
          },
          "integrated": {
            "type": "boolean",
            "nullable": true
          }
        },
        "title": "CustomerMovementOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\CustomerMovementOutputDTO"
      },
      "CustomerDebitOutputDTO": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "type_description": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "string",
            "nullable": true
          },
          "customer_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "customer_tax_id": {
            "type": "string",
            "nullable": true
          },
          "vendor_code": {
            "type": "string",
            "nullable": true
          },
          "vendor_name": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "total": {
            "type": "number"
          },
          "amount_paid": {
            "type": "number"
          },
          "amount_to_pay": {
            "type": "number",
            "nullable": true
          },
          "payment_method": {
            "type": "string",
            "nullable": true
          },
          "days_late": {
            "type": "integer",
            "nullable": true
          },
          "debit": {
            "type": "number"
          },
          "credit": {
            "type": "number"
          },
          "balance": {
            "type": "number",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile_phone": {
            "type": "string",
            "nullable": true
          },
          "litigious": {
            "type": "boolean",
            "nullable": true
          },
          "serie_code": {
            "type": "string",
            "nullable": true
          },
          "serie_name": {
            "type": "string",
            "nullable": true
          },
          "zone_code": {
            "type": "string",
            "nullable": true
          },
          "zone_name": {
            "type": "string",
            "nullable": true
          },
          "classification_code": {
            "type": "string",
            "nullable": true
          },
          "classification_name": {
            "type": "string",
            "nullable": true
          },
          "manager_code": {
            "type": "string",
            "nullable": true
          },
          "manager_name": {
            "type": "string",
            "nullable": true
          },
          "plate": {
            "type": "string",
            "nullable": true
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "ceiling": {
            "type": "number",
            "nullable": true
          }
        },
        "title": "CustomerDebitOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\CustomerDebitOutputDTO"
      },
      "BusinessAreaOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "BusinessAreaOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Crm\\BusinessAreas\\DTOs\\BusinessAreaOutputDTO"
      },
      "CustomerPriceTableOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "customer_id": {
            "type": "integer"
          },
          "article_id": {
            "type": "string",
            "nullable": true
          },
          "family_code": {
            "type": "string",
            "nullable": true
          },
          "subfamily_code": {
            "type": "string",
            "nullable": true
          },
          "subsubfamily_code": {
            "type": "string",
            "nullable": true
          },
          "payment_method_code": {
            "type": "string",
            "nullable": true
          },
          "article_type": {
            "type": "string",
            "nullable": true
          },
          "currency_code": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "number",
            "nullable": true
          },
          "discount": {
            "type": "number",
            "nullable": true
          },
          "discount_2": {
            "type": "number",
            "nullable": true
          },
          "discount_3": {
            "type": "number"
          },
          "discount_4": {
            "type": "number"
          },
          "discount_5": {
            "type": "number"
          },
          "discount_value": {
            "type": "number",
            "nullable": true
          },
          "brand_id": {
            "type": "integer",
            "nullable": true
          },
          "article": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string"
              },
              "description": {
                "type": "string",
                "nullable": true
              },
              "brand": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "datetime"
          },
          "updated_at": {
            "type": "string",
            "format": "datetime"
          }
        },
        "title": "CustomerPriceTableOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\CustomerPriceTableOutputDTO"
      },
      "CustomerGraphOutputDTO": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer"
          },
          "selected_year": {
            "type": "integer",
            "nullable": true
          },
          "series": {
            "type": "array",
            "nullable": true
          },
          "drilldown_series": {
            "type": "array",
            "nullable": true
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "article_type": {
            "type": "string",
            "nullable": true
          },
          "values": {
            "type": "array",
            "nullable": true
          },
          "ticks": {
            "type": "array",
            "nullable": true
          },
          "max": {
            "type": "number",
            "nullable": true
          }
        },
        "title": "CustomerGraphOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Customers\\DTOs\\CustomerGraphOutputDTO"
      },
      "SupplierContactOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 121
          },
          "entity_type": {
            "type": "string",
            "example": "C"
          },
          "entity_id": {
            "type": "integer",
            "example": 2224
          },
          "contact_type": {
            "type": "string",
            "example": "email"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "Principal"
          },
          "contact": {
            "type": "string",
            "example": "contato@fornecedor.pt"
          },
          "preferential": {
            "type": "boolean",
            "example": true
          },
          "address_id": {
            "type": "integer",
            "nullable": true,
            "example": 652
          },
          "is_billing": {
            "type": "boolean",
            "example": false
          },
          "is_commercial": {
            "type": "boolean",
            "example": false
          },
          "is_technical": {
            "type": "boolean",
            "example": false
          },
          "is_whatsapp": {
            "type": "boolean",
            "example": false
          },
          "is_salary": {
            "type": "boolean",
            "example": false
          },
          "send_email": {
            "type": "boolean",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "SupplierContactOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Suppliers\\DTOs\\SupplierContactOutputDTO"
      },
      "ProspectContactOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 121
          },
          "entity_type": {
            "type": "string",
            "example": "P"
          },
          "entity_id": {
            "type": "integer",
            "example": 42
          },
          "contact_type": {
            "type": "string",
            "example": "email"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "Principal"
          },
          "contact": {
            "type": "string",
            "example": "prospect@empresa.pt"
          },
          "preferential": {
            "type": "boolean",
            "example": true
          },
          "address_id": {
            "type": "integer",
            "nullable": true,
            "example": 652
          },
          "is_billing": {
            "type": "boolean",
            "example": false
          },
          "is_commercial": {
            "type": "boolean",
            "example": false
          },
          "is_technical": {
            "type": "boolean",
            "example": false
          },
          "is_whatsapp": {
            "type": "boolean",
            "example": false
          },
          "is_salary": {
            "type": "boolean",
            "example": false
          },
          "send_email": {
            "type": "boolean",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "ProspectContactOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Prospects\\DTOs\\ProspectContactOutputDTO"
      },
      "SellerZoneOutputDTO": {
        "type": "object",
        "properties": {
          "zone_id": {
            "type": "string",
            "example": "7"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "Zona Norte"
          }
        },
        "title": "SellerZoneOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Sellers\\DTOs\\SellerZoneOutputDTO"
      },
      "SellerContactOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 121
          },
          "entity_type": {
            "type": "string",
            "example": "R"
          },
          "entity_id": {
            "type": "integer",
            "example": 42
          },
          "contact_type": {
            "type": "string",
            "example": "email"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "Principal"
          },
          "contact": {
            "type": "string",
            "example": "comercial@empresa.pt"
          },
          "preferential": {
            "type": "boolean",
            "example": true
          },
          "address_id": {
            "type": "integer",
            "nullable": true,
            "example": 652
          },
          "is_billing": {
            "type": "boolean",
            "example": false
          },
          "is_commercial": {
            "type": "boolean",
            "example": false
          },
          "is_technical": {
            "type": "boolean",
            "example": false
          },
          "is_whatsapp": {
            "type": "boolean",
            "example": false
          },
          "is_salary": {
            "type": "boolean",
            "example": false
          },
          "send_email": {
            "type": "boolean",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "SellerContactOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Sellers\\DTOs\\SellerContactOutputDTO"
      },
      "ContactEntityOutputDTO": {
        "type": "object",
        "properties": {
          "entity_id": {
            "type": "integer",
            "example": 456
          },
          "entity_type": {
            "type": "string",
            "example": "C"
          },
          "role_id": {
            "type": "string",
            "nullable": true,
            "example": "1"
          },
          "department": {
            "type": "string",
            "nullable": true
          },
          "extension": {
            "type": "string",
            "nullable": true
          },
          "observations": {
            "type": "string",
            "nullable": true
          },
          "is_default": {
            "type": "boolean",
            "example": true
          }
        },
        "title": "ContactEntityOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Contacts\\DTOs\\ContactEntityOutputDTO"
      },
      "EmployeeContactOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 121
          },
          "entity_type": {
            "type": "string",
            "example": "E"
          },
          "entity_id": {
            "type": "integer",
            "example": 1
          },
          "contact_type": {
            "type": "string",
            "example": "email"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "Principal"
          },
          "contact": {
            "type": "string",
            "example": "empregado@empresa.pt"
          },
          "preferential": {
            "type": "boolean",
            "example": true
          },
          "address_id": {
            "type": "integer",
            "nullable": true,
            "example": null
          },
          "is_billing": {
            "type": "boolean",
            "example": false
          },
          "is_commercial": {
            "type": "boolean",
            "example": false
          },
          "is_technical": {
            "type": "boolean",
            "example": false
          },
          "is_whatsapp": {
            "type": "boolean",
            "example": false
          },
          "is_salary": {
            "type": "boolean",
            "example": false
          },
          "send_email": {
            "type": "boolean",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "title": "EmployeeContactOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Entidade\\Employees\\DTOs\\EmployeeContactOutputDTO"
      },
      "FranchiseDocumentHeaderOutputDTO": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "integer",
            "description": "Franchise connection identifier"
          },
          "num": {
            "type": "integer",
            "description": "Document internal number"
          },
          "tipoop": {
            "type": "string",
            "description": "Document operation type"
          },
          "docnome": {
            "type": "string",
            "description": "Document name"
          },
          "typesaft": {
            "type": "string",
            "description": "SAFT document type"
          },
          "recibo": {
            "type": "string",
            "description": "Receipt flag"
          },
          "debita": {
            "type": "string",
            "description": "Debit flag"
          },
          "credita": {
            "type": "string",
            "description": "Credit flag"
          },
          "documentnumber": {
            "type": "string",
            "description": "Document number"
          },
          "nserie": {
            "type": "string",
            "description": "Series code"
          },
          "nserie_desc": {
            "type": "string",
            "description": "Series description"
          },
          "data": {
            "type": "string",
            "format": "date",
            "description": "Document date"
          },
          "datalimitepaga": {
            "type": "string",
            "format": "date",
            "description": "Payment due date"
          },
          "codmoeda": {
            "type": "string",
            "description": "Currency code"
          },
          "perdesc": {
            "type": "number",
            "description": "Discount percent 1"
          },
          "perdesc2": {
            "type": "number",
            "description": "Discount percent 2"
          },
          "totalsiva": {
            "type": "number",
            "description": "Total without VAT"
          },
          "valordesc": {
            "type": "number",
            "description": "Discount amount"
          },
          "valoriva": {
            "type": "number",
            "description": "VAT amount"
          },
          "total": {
            "type": "number",
            "description": "Total with VAT"
          },
          "valorpago": {
            "type": "number",
            "description": "Paid amount"
          },
          "margemlucro": {
            "type": "number",
            "description": "Profit margin"
          },
          "anulado": {
            "type": "string",
            "description": "Cancelled flag"
          },
          "estado": {
            "type": "string",
            "description": "Document state"
          },
          "codterc": {
            "type": "string",
            "description": "Third party code"
          },
          "nomefact": {
            "type": "string",
            "description": "Invoice name"
          },
          "ncontribfact": {
            "type": "string",
            "description": "Invoice tax id"
          },
          "codpaisfact": {
            "type": "string",
            "description": "Invoice country code"
          },
          "datareg": {
            "type": "string",
            "format": "date-time",
            "description": "Registration timestamp"
          },
          "dataanul": {
            "type": "string",
            "format": "date",
            "description": "Cancellation date"
          }
        },
        "title": "FranchiseDocumentHeaderOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Franchise\\DTOs\\FranchiseDocumentHeaderOutputDTO"
      },
      "FranchiseDocumentLineOutputDTO": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "integer",
            "description": "Franchise connection identifier"
          },
          "num": {
            "type": "integer",
            "description": "Document internal number"
          },
          "tipoop": {
            "type": "string",
            "description": "Document operation type"
          },
          "nlinha": {
            "type": "integer",
            "description": "Line number"
          },
          "docnome": {
            "type": "string",
            "description": "Document name"
          },
          "typesaft": {
            "type": "string",
            "description": "SAFT document type"
          },
          "recibo": {
            "type": "string",
            "description": "Receipt flag"
          },
          "debita": {
            "type": "string",
            "description": "Debit flag"
          },
          "credita": {
            "type": "string",
            "description": "Credit flag"
          },
          "codartigo": {
            "type": "string",
            "description": "Article code"
          },
          "designacao": {
            "type": "string",
            "description": "Article description"
          },
          "codloja": {
            "type": "string",
            "description": "Store code"
          },
          "codunidade": {
            "type": "string",
            "description": "Unit code"
          },
          "tipoartigo": {
            "type": "string",
            "description": "Article type"
          },
          "qtd": {
            "type": "number",
            "description": "Quantity"
          },
          "precouni": {
            "type": "number",
            "description": "Unit price"
          },
          "iva": {
            "type": "number",
            "description": "VAT percent"
          },
          "pvp": {
            "type": "number",
            "description": "Retail price"
          },
          "discounts": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "Discount percent columns in order (desconto, desconto2, ... descontoN)"
          },
          "totalsiva": {
            "type": "number",
            "description": "Total without VAT"
          },
          "valoriva": {
            "type": "number",
            "description": "VAT amount"
          },
          "total": {
            "type": "number",
            "description": "Total with VAT"
          },
          "precocustomed": {
            "type": "number",
            "description": "Average cost price"
          },
          "margemlucro": {
            "type": "number",
            "description": "Profit margin"
          },
          "estado": {
            "type": "string",
            "description": "Line state"
          },
          "codlote": {
            "type": "string",
            "description": "Batch code"
          }
        },
        "title": "FranchiseDocumentLineOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Franchise\\DTOs\\FranchiseDocumentLineOutputDTO"
      },
      "FranchiseDocumentPaymentOutputDTO": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "integer",
            "description": "Franchise connection identifier"
          },
          "modobase": {
            "type": "string",
            "description": "Base payment mode"
          },
          "valor": {
            "type": "number",
            "description": "Sum of original values grouped by modobase"
          }
        },
        "title": "FranchiseDocumentPaymentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Franchise\\DTOs\\FranchiseDocumentPaymentOutputDTO"
      },
      "FranchiseDocumentPaymentMethodOutputDTO": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "integer",
            "description": "Franchise connection identifier"
          },
          "num": {
            "type": "integer",
            "description": "Document internal number"
          },
          "tipoop": {
            "type": "string",
            "description": "Document operation type"
          },
          "nlinha": {
            "type": "integer",
            "description": "Line number"
          },
          "codmodopag": {
            "type": "string",
            "description": "Payment method code"
          },
          "modopag": {
            "type": "string",
            "description": "Payment method description"
          },
          "valor": {
            "type": "number",
            "description": "Amount"
          },
          "codmoeda": {
            "type": "string",
            "description": "Currency code"
          },
          "codbanco": {
            "type": "string",
            "description": "Bank code"
          },
          "banco": {
            "type": "string",
            "description": "Bank description"
          },
          "ncheque": {
            "type": "string",
            "description": "Cheque number"
          },
          "datacheque": {
            "type": "string",
            "format": "date",
            "description": "Cheque date"
          },
          "data": {
            "type": "string",
            "format": "date",
            "description": "Payment date"
          },
          "ncaixa": {
            "type": "string",
            "description": "Cash register code"
          },
          "caixa": {
            "type": "string",
            "description": "Cash register description"
          }
        },
        "title": "FranchiseDocumentPaymentMethodOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Franchise\\DTOs\\FranchiseDocumentPaymentMethodOutputDTO"
      },
      "RoomStatusOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true
          },
          "code": {
            "type": "string"
          },
          "room_type": {
            "type": "string",
            "nullable": true
          },
          "capacity": {
            "type": "integer",
            "nullable": true,
            "description": "How many people the room type sleeps (`QuartosTipos_c.Ocupacao`)."
          },
          "room_notes": {
            "type": "string",
            "nullable": true,
            "description": "The hotel's own remark about the room, from the support tables. NOT the observation on the stay, which travels as `occupancy.notes`. Read-only here: it is maintained in hotel/apoio/quartos."
          },
          "status_code": {
            "type": "string",
            "nullable": true
          },
          "status_label": {
            "type": "string",
            "nullable": true
          },
          "status_color": {
            "type": "string",
            "nullable": true
          },
          "next_check_in": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Start of the next stay booked for this room after the requested day, or null when nothing is booked. Reported for taken rooms too, where it is the stay that follows the current one."
          },
          "free_since": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "End of the last stay this room had, and so the day it became free. Null on a taken room, and null on a room that has never been let. A stay ending on the requested day counts: the legacy board frees the room the day the guest leaves."
          },
          "occupancy": {
            "type": "object",
            "nullable": true,
            "description": "Null when no booking covers the room on that day. When more than one covers it, the LAST one wins -- the legacy loop does not stop at the first match and the widget has always rendered it that way.",
            "properties": {
              "checkin": {
                "type": "string",
                "nullable": true,
                "description": "Raw check-in marker from the booking row, never translated: F awaiting arrival, T arrived, O departed."
              },
              "booking_code": {
                "type": "integer",
                "nullable": true
              },
              "detail_id": {
                "type": "integer",
                "nullable": true,
                "description": "The booking LINE for this room, which is what `notes` belongs to and what PATCH booking-lines/{id} addresses."
              },
              "date_in": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "date_out": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "notes": {
                "type": "string",
                "nullable": true
              },
              "accommodation": {
                "type": "string",
                "nullable": true
              },
              "price": {
                "type": "number",
                "nullable": true,
                "description": "Price of the line WITH VAT applied, at the tenant rate HOT_IvaAloj."
              },
              "billing": {
                "type": "string",
                "enum": [
                  "invoiced",
                  "partial",
                  "pending"
                ],
                "description": "`partial` is a line not yet invoiced that already has money against it, which is how the reservation screen reports it."
              },
              "agency": {
                "type": "string",
                "nullable": true,
                "description": "Name of the booking's agency (`Reservas_c.CodTerc_c`, the field the reservation screen labels \"Agencia\"). Null on a direct booking."
              },
              "customer": {
                "type": "string",
                "nullable": true,
                "description": "Name of the booking's customer (`Reservas_c.OutrosTerc_c`, the field the reservation screen labels \"Cliente\"). It is the party the stay is billed to, which need not be anybody sleeping in the room."
              },
              "guests": {
                "type": "array",
                "description": "The people registered in THIS room, a different grain from the booking: a line can carry several or none. Empty list, never null.",
                "items": {
                  "type": "object",
                  "properties": {
                    "first_name": {
                      "type": "string",
                      "nullable": true
                    },
                    "last_name": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "title": "RoomStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Hotel\\Status\\DTOs\\RoomStatusOutputDTO"
      },
      "BedStatusOutputDTO": {
        "type": "object",
        "properties": {
          "room_id": {
            "type": "integer",
            "nullable": true
          },
          "room_code": {
            "type": "string"
          },
          "bed": {
            "type": "string",
            "nullable": true
          },
          "room_type": {
            "type": "string",
            "nullable": true
          },
          "gender": {
            "type": "string",
            "nullable": true
          },
          "status_code": {
            "type": "string",
            "nullable": true
          },
          "status_label": {
            "type": "string",
            "nullable": true
          },
          "status_color": {
            "type": "string",
            "nullable": true
          },
          "occupancy": {
            "type": "object",
            "nullable": true
          }
        },
        "title": "BedStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Hotel\\Status\\DTOs\\BedStatusOutputDTO"
      },
      "ServiceStatusOutputDTO": {
        "type": "object",
        "properties": {
          "booking_detail_id": {
            "type": "integer",
            "nullable": true
          },
          "booking_code": {
            "type": "integer",
            "nullable": true
          },
          "room_code": {
            "type": "string",
            "nullable": true
          },
          "room_type": {
            "type": "string",
            "nullable": true
          },
          "accommodation_type_code": {
            "type": "integer",
            "nullable": true
          },
          "accommodation_type": {
            "type": "string",
            "nullable": true
          },
          "date_in": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "date_out": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "occupants": {
            "type": "integer"
          },
          "service_code": {
            "type": "string",
            "nullable": true
          },
          "service_name": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "ServiceStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Hotel\\Status\\DTOs\\ServiceStatusOutputDTO"
      },
      "RoomConditionOutputDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "RoomConditionOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Hotel\\Status\\DTOs\\RoomConditionOutputDTO"
      },
      "AppointmentVehicleOutputDTO": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle plate"
          },
          "brand_name": {
            "type": "string",
            "nullable": true,
            "description": "Brand name"
          },
          "model_name": {
            "type": "string",
            "nullable": true,
            "description": "Model name"
          },
          "version_name": {
            "type": "string",
            "nullable": true,
            "description": "Version name"
          },
          "manufacturing_year": {
            "type": "integer",
            "nullable": true,
            "description": "Manufacturing year"
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle image URL"
          },
          "image_raster_url": {
            "type": "string",
            "nullable": true,
            "description": "Recolored raster (WebP) vehicle image URL"
          },
          "color": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle color"
          }
        },
        "title": "AppointmentVehicleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\AppointmentVehicleOutputDTO"
      },
      "ReceptionDeliveryEventOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Synthetic event id (service-order-{num}-{type} or appointment-{numrel}-{type})"
          },
          "pair_id": {
            "type": "string",
            "description": "Groups the reception and the delivery originated by the same service order or standalone appointment (service-order-{num} or appointment-{numrel})"
          },
          "type": {
            "type": "string",
            "enum": [
              "reception",
              "delivery"
            ],
            "description": "Event type"
          },
          "title": {
            "type": "string",
            "description": "Short title (plate). Frontend prefixes with localized label."
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "Event datetime (start == end for point-in-time events)"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "description": "Event datetime (start == end for point-in-time events)"
          },
          "reception_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Reception timestamp of the pair, present even when it falls outside the requested range; null when the source has none"
          },
          "delivery_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Delivery timestamp of the pair, present even when it falls outside the requested range; null when the source has none"
          },
          "service_order": {
            "type": "object",
            "nullable": true,
            "description": "Associated service order (null for standalone appointments)",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "vehicle": {
            "$ref": "#/components/schemas/AppointmentVehicleOutputDTO"
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "nullable": true
              },
              "name": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "interventions": {
            "type": "object",
            "nullable": true,
            "description": "Pending and executed intervention aggregates + lists (set whenever service_order is set; null otherwise)",
            "properties": {
              "pending_count": {
                "type": "integer"
              },
              "remaining_minutes": {
                "type": "number"
              },
              "pending": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Intervention type id"
                    },
                    "description": {
                      "type": "string"
                    },
                    "extra_description": {
                      "type": "string",
                      "nullable": true
                    },
                    "estimated_minutes": {
                      "type": "number"
                    }
                  }
                }
              },
              "executed_count": {
                "type": "integer",
                "description": "Interventions already executed on the service order"
              },
              "executed_minutes": {
                "type": "number",
                "description": "Estimated minutes of the executed interventions"
              },
              "executed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Intervention type id"
                    },
                    "description": {
                      "type": "string"
                    },
                    "extra_description": {
                      "type": "string",
                      "nullable": true
                    },
                    "estimated_minutes": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        },
        "title": "ReceptionDeliveryEventOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\ReceptionDeliveryEventOutputDTO"
      },
      "AppointmentUpcomingOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Appointment identifier (relcontacto.numrel)"
          },
          "subject": {
            "type": "string",
            "description": "Appointment subject; omitted when empty"
          },
          "event_type": {
            "type": "string",
            "description": "Event kind: Appt, Phone, ToDo or Email; omitted when empty"
          },
          "category_id": {
            "type": "string",
            "description": "Event category code; omitted when empty"
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "Start date and time; omitted when empty"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "description": "End date and time; omitted when empty"
          },
          "entities": {
            "type": "array",
            "description": "Entities linked to the appointment, direct one first; always present, empty when none",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Entity identifier; 0 is a real entity (Cliente Final)"
                },
                "type": {
                  "type": "string",
                  "description": "Entity type: C, P, F, E, R or T"
                },
                "name": {
                  "type": "string",
                  "nullable": true,
                  "description": "Entity name"
                }
              }
            }
          },
          "service_order": {
            "type": "object",
            "description": "Associated service order; omitted when empty",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "vehicle_ref": {
            "type": "string",
            "description": "External equipment/vehicle reference; omitted when empty"
          }
        },
        "title": "AppointmentUpcomingOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\AppointmentUpcomingOutputDTO"
      },
      "CustomerAppointmentAttendanceOutputDTO": {
        "type": "object",
        "properties": {
          "no_shows": {
            "type": "integer",
            "description": "Number of no-shows among the last 10 past appointments"
          },
          "total": {
            "type": "integer",
            "description": "Number of past appointments considered (up to 10)"
          }
        },
        "title": "CustomerAppointmentAttendanceOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Appointments\\DTOs\\CustomerAppointmentAttendanceOutputDTO"
      },
      "AgendaSettingsOutputDTO": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          }
        },
        "title": "AgendaSettingsOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\AgendaSettings\\DTOs\\AgendaSettingsOutputDTO"
      },
      "MechanicOutputDTO": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "integer",
            "description": "Employee ID"
          },
          "name": {
            "type": "string",
            "description": "Full name"
          },
          "short_name": {
            "type": "string",
            "description": "Short name"
          },
          "department_id": {
            "type": "integer",
            "description": "Department ID"
          },
          "show_in_monitor": {
            "type": "integer",
            "description": "Show in monitor flag"
          }
        },
        "title": "MechanicOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\MechanicAvailability\\DTOs\\MechanicOutputDTO"
      },
      "MechanicAvailabilityOutputDTO": {
        "type": "object",
        "properties": {
          "available": {
            "$ref": "#/components/schemas/MechanicOutputDTO"
          },
          "busy": {
            "$ref": "#/components/schemas/MechanicOutputDTO"
          }
        },
        "title": "MechanicAvailabilityOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\MechanicAvailability\\DTOs\\MechanicAvailabilityOutputDTO"
      },
      "MechanicOccupancyDayOutputDTO": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "Day inside the interval"
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "vacation",
              "absence",
              "holiday",
              "off"
            ],
            "description": "Mechanic state that day"
          },
          "capacity_minutes": {
            "type": "integer",
            "description": "Scheduled working minutes (0 when not available)"
          },
          "occupied_minutes": {
            "type": "integer",
            "description": "Minutes booked by appointments"
          }
        },
        "title": "MechanicOccupancyDayOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\MechanicAvailability\\DTOs\\MechanicOccupancyDayOutputDTO"
      },
      "MechanicOccupancyItemOutputDTO": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "integer",
            "description": "Mechanic employee id"
          },
          "department_id": {
            "type": "integer",
            "nullable": true,
            "description": "Mechanic department id"
          },
          "days": {
            "$ref": "#/components/schemas/MechanicOccupancyDayOutputDTO"
          }
        },
        "title": "MechanicOccupancyItemOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\MechanicAvailability\\DTOs\\MechanicOccupancyItemOutputDTO"
      },
      "VehicleArticleOutputDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string",
            "description": "Article code"
          },
          "description": {
            "type": "string",
            "description": "Article description"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "Document number"
          },
          "operation_type": {
            "type": "string",
            "description": "Operation type code"
          },
          "number": {
            "type": "string",
            "description": "Document internal number"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Document date (ISO-8601)"
          },
          "quantity": {
            "type": "number",
            "description": "Quantity"
          },
          "total": {
            "type": "number",
            "description": "Total value"
          },
          "family_id": {
            "type": "string",
            "nullable": true,
            "description": "Article family code"
          },
          "family_name": {
            "type": "string",
            "nullable": true,
            "description": "Article family name"
          },
          "brand_id": {
            "type": "string",
            "nullable": true,
            "description": "Article brand code"
          },
          "brand_name": {
            "type": "string",
            "nullable": true,
            "description": "Article brand name"
          },
          "km_counter": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle km counter at time of document"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true,
            "description": "Customer ID"
          },
          "account_update": {
            "type": "string",
            "nullable": true,
            "description": "Account update flag"
          }
        },
        "title": "VehicleArticleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehicleArticleOutputDTO"
      },
      "VehicleNoteOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Note identifier"
          },
          "plate": {
            "type": "string",
            "description": "Vehicle plate the note belongs to"
          },
          "subject": {
            "type": "string",
            "description": "Note subject"
          },
          "text": {
            "type": "string",
            "description": "HTML from the back-office editor; sanitize before rendering"
          },
          "notify_sale": {
            "type": "boolean",
            "description": "Shown when the vehicle is used in a sale document"
          },
          "notify_service_order": {
            "type": "boolean",
            "description": "Shown when the vehicle is used in a service order"
          },
          "notify_process": {
            "type": "boolean",
            "description": "Shown when the vehicle is used in a workshop process"
          },
          "notify_appointment": {
            "type": "boolean",
            "description": "Shown when the vehicle is used in an agenda appointment"
          },
          "author_id": {
            "type": "integer",
            "nullable": true,
            "description": "Author employee code"
          },
          "author_name": {
            "type": "string",
            "nullable": true,
            "description": "Author employee name"
          },
          "created_by": {
            "type": "integer",
            "nullable": true,
            "description": "User who created the note"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "updated_by": {
            "type": "integer",
            "nullable": true,
            "description": "User who last updated the note"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp"
          }
        },
        "title": "VehicleNoteOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Vehicle\\DTOs\\VehicleNoteOutputDTO"
      },
      "Oficinas__MechanicOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "short_name": {
            "type": "string"
          },
          "department_id": {
            "type": "integer",
            "nullable": true
          }
        },
        "title": "MechanicOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Mechanic\\DTOs\\MechanicOutputDTO"
      },
      "ListServiceOrderDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer"
          },
          "document_number": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "plate": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer"
          },
          "invoice_name": {
            "type": "string"
          },
          "mechanic_id": {
            "type": "integer"
          },
          "department_id": {
            "type": "integer"
          },
          "priority": {
            "type": "integer"
          },
          "expected_delivery_date": {
            "type": "string"
          },
          "km_counter": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "awaiting_parts": {
            "type": "boolean"
          },
          "awaiting_authorization": {
            "type": "boolean"
          },
          "system_entry_date": {
            "type": "string"
          }
        },
        "title": "ListServiceOrderDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ListServiceOrderDTO"
      },
      "ServiceOrderDetailsDTO": {
        "type": "object",
        "properties": {
          "print_observations_on_invoice": {
            "type": "boolean",
            "description": "Whether the observations are printed on the invoice."
          },
          "print_mechanic_observations_on_invoice": {
            "type": "boolean",
            "description": "Whether the technical observations are printed on the invoice."
          },
          "invoice_observations": {
            "type": "boolean",
            "deprecated": true,
            "description": "Deprecated (sunset 2027-02-28), use print_observations_on_invoice."
          },
          "mechanic_invoice_observations": {
            "type": "boolean",
            "deprecated": true,
            "description": "Deprecated (sunset 2027-02-28), use print_mechanic_observations_on_invoice."
          },
          "lines": {
            "type": "array"
          },
          "extra_lines": {
            "type": "array"
          },
          "interventions": {
            "type": "array"
          }
        },
        "title": "ServiceOrderDetailsDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderDetailsDTO"
      },
      "ServiceOrderNextStatusOutputDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "order": {
            "type": "integer"
          },
          "operation_label": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "transition",
              "direct"
            ]
          }
        },
        "title": "ServiceOrderNextStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderNextStatusOutputDTO"
      },
      "ServiceOrderFlowDocumentDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "customer": {
            "type": "string"
          },
          "total": {
            "type": "number"
          }
        },
        "title": "ServiceOrderFlowDocumentDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderFlowDocumentDTO"
      },
      "ServiceOrderImageDTO": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "file_type": {
            "type": "string"
          },
          "file_size": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "title": "ServiceOrderImageDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderImageDTO"
      },
      "ServiceOrderNoteDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "integer"
          },
          "subject": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "author_id": {
            "type": "integer",
            "nullable": true
          },
          "author_name": {
            "type": "string"
          },
          "author_initials": {
            "type": "string"
          },
          "author_avatar_url": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "nullable": true
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_delete": {
            "type": "boolean"
          }
        },
        "title": "ServiceOrderNoteDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\DTOs\\ServiceOrderNoteDTO"
      },
      "AlertOutputDTO": {
        "type": "object",
        "properties": {
          "inspections": {
            "type": "array",
            "description": "Upcoming inspection alerts",
            "items": {
              "type": "object",
              "properties": {
                "plate": {
                  "type": "string",
                  "description": "Vehicle plate"
                },
                "next_inspection": {
                  "type": "string",
                  "description": "Next inspection date"
                }
              }
            }
          },
          "oil": {
            "type": "array",
            "description": "Oil change alerts",
            "items": {
              "type": "object",
              "properties": {
                "plate": {
                  "type": "string",
                  "description": "Vehicle plate"
                },
                "monthly_km": {
                  "type": "number",
                  "description": "Average monthly kilometers"
                },
                "vehicle_km": {
                  "type": "number",
                  "description": "Current vehicle kilometers"
                },
                "last_visit_date": {
                  "type": "string",
                  "description": "Date of last workshop visit"
                },
                "manufacturing_year": {
                  "type": "string",
                  "description": "Vehicle manufacturing year"
                },
                "months_diff": {
                  "type": "integer",
                  "description": "Months since last visit"
                },
                "customer_id": {
                  "type": "integer",
                  "description": "Customer ID"
                },
                "customer_name": {
                  "type": "string",
                  "description": "Customer name"
                },
                "brand": {
                  "type": "string",
                  "description": "Vehicle brand"
                },
                "model": {
                  "type": "string",
                  "description": "Vehicle model"
                },
                "phone": {
                  "type": "string",
                  "description": "Customer phone"
                },
                "mobile_phone": {
                  "type": "string",
                  "description": "Customer mobile phone"
                },
                "oil_change_every_km": {
                  "type": "number",
                  "description": "Oil change interval in km"
                },
                "oil_change_every_months": {
                  "type": "number",
                  "description": "Oil change interval in months"
                },
                "date_prev_oil_change": {
                  "type": "string",
                  "description": "Predicted next oil change date"
                }
              }
            }
          },
          "tires": {
            "type": "array",
            "description": "Tire change alerts",
            "items": {
              "type": "object",
              "properties": {
                "plate": {
                  "type": "string",
                  "description": "Vehicle plate"
                },
                "monthly_km": {
                  "type": "number",
                  "description": "Average monthly kilometers"
                },
                "vehicle_km": {
                  "type": "number",
                  "description": "Current vehicle kilometers"
                },
                "last_visit_date": {
                  "type": "string",
                  "description": "Date of last workshop visit"
                },
                "manufacturing_year": {
                  "type": "string",
                  "description": "Vehicle manufacturing year"
                },
                "months_diff": {
                  "type": "integer",
                  "description": "Months since last visit"
                },
                "customer_id": {
                  "type": "integer",
                  "description": "Customer ID"
                },
                "customer_name": {
                  "type": "string",
                  "description": "Customer name"
                },
                "brand": {
                  "type": "string",
                  "description": "Vehicle brand"
                },
                "model": {
                  "type": "string",
                  "description": "Vehicle model"
                },
                "phone": {
                  "type": "string",
                  "description": "Customer phone"
                },
                "mobile_phone": {
                  "type": "string",
                  "description": "Customer mobile phone"
                },
                "tire_change_every_km": {
                  "type": "number",
                  "description": "Tire change interval in km"
                },
                "tire_change_every_months": {
                  "type": "number",
                  "description": "Tire change interval in months"
                },
                "date_prev_tire_change": {
                  "type": "string",
                  "description": "Predicted next tire change date"
                }
              }
            }
          }
        },
        "title": "AlertOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Alert\\DTOs\\AlertOutputDTO"
      },
      "ScheduleOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Schedule ID"
          },
          "subject": {
            "type": "string",
            "description": "Schedule subject"
          },
          "plate": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "service_order": {
            "type": "object",
            "nullable": true,
            "description": "Linked service order, null when the schedule has none",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "start_date": {
            "type": "string",
            "description": "Start datetime"
          },
          "end_date": {
            "type": "string",
            "description": "End datetime"
          },
          "start_time": {
            "type": "string",
            "description": "Start time"
          },
          "end_time": {
            "type": "string",
            "description": "End time"
          },
          "customer_id": {
            "type": "integer",
            "description": "Customer ID"
          },
          "customer_type": {
            "type": "string",
            "description": "Customer type"
          },
          "place": {
            "type": "string",
            "description": "Location"
          },
          "priority": {
            "type": "integer",
            "description": "Priority level"
          },
          "is_accomplished": {
            "type": "integer",
            "description": "Whether accomplished"
          }
        },
        "title": "ScheduleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Schedule\\DTOs\\ScheduleOutputDTO"
      },
      "MaintenanceNoticeOutputDTO": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "limit_date": {
            "type": "string",
            "description": "Maintenance limit date"
          },
          "km_vehicle": {
            "type": "number",
            "description": "Vehicle kilometers"
          },
          "obs": {
            "type": "string",
            "description": "Observations"
          }
        },
        "title": "MaintenanceNoticeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\MaintenanceNotice\\DTOs\\MaintenanceNoticeOutputDTO"
      },
      "VehicleGenerationOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Generation ID"
          },
          "description": {
            "type": "string",
            "description": "Generation period description"
          },
          "date_start": {
            "type": "string",
            "description": "Generation start date"
          },
          "date_end": {
            "type": "string",
            "description": "Generation end date"
          },
          "model_id": {
            "type": "integer",
            "description": "Vehicle model ID"
          },
          "model": {
            "type": "string",
            "description": "Vehicle model name (when additional_fields requested)"
          },
          "brand_id": {
            "type": "integer",
            "description": "Vehicle brand ID (when additional_fields requested)"
          },
          "brand": {
            "type": "string",
            "description": "Vehicle brand name (when additional_fields requested)"
          }
        },
        "title": "VehicleGenerationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\VehicleGeneration\\DTOs\\VehicleGenerationOutputDTO"
      },
      "CameraPlateVehicleOutputDTO": {
        "type": "object",
        "properties": {
          "camera_plate_id": {
            "type": "integer",
            "description": "Camera plate record ID"
          },
          "plate": {
            "type": "string",
            "description": "Vehicle plate number"
          },
          "customer_id": {
            "type": "integer",
            "description": "Owner customer ID"
          },
          "description": {
            "type": "string",
            "description": "Vehicle description"
          },
          "brand": {
            "type": "string",
            "description": "Brand name"
          },
          "model": {
            "type": "string",
            "description": "Model name"
          },
          "version": {
            "type": "string",
            "description": "Version name"
          },
          "fuel": {
            "type": "string",
            "description": "Fuel type"
          },
          "current_km": {
            "type": "integer",
            "description": "Current kilometer reading"
          },
          "date_last_visit": {
            "type": "string",
            "description": "Date of last workshop visit"
          },
          "is_new": {
            "type": "integer",
            "description": "Whether the vehicle is new (1) or existing (0)"
          }
        },
        "title": "CameraPlateVehicleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\CameraPlate\\DTOs\\CameraPlateVehicleOutputDTO"
      },
      "MonitorInterventionOutputDto": {
        "type": "object",
        "properties": {
          "sequence_number": {
            "type": "integer",
            "description": "Intervention sequence number"
          },
          "intervention": {
            "type": "string",
            "nullable": true,
            "description": "Intervention type description"
          },
          "completed": {
            "type": "boolean",
            "description": "Whether the intervention is completed"
          },
          "duration": {
            "type": "number",
            "nullable": true,
            "description": "Duration in minutes"
          }
        },
        "title": "MonitorInterventionOutputDto",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Monitor\\DTOs\\MonitorInterventionOutputDto"
      },
      "MonitorMechanicOutputDto": {
        "type": "object",
        "properties": {
          "employee_code": {
            "type": "integer",
            "description": "Employee code"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Employee name"
          },
          "start_time": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Work start time"
          }
        },
        "title": "MonitorMechanicOutputDto",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Monitor\\DTOs\\MonitorMechanicOutputDto"
      },
      "MonitorVehicleOutputDto": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle description"
          },
          "manufacturing_year": {
            "type": "integer",
            "nullable": true,
            "description": "Manufacturing year"
          },
          "km_counter": {
            "type": "integer",
            "nullable": true,
            "description": "Kilometer counter"
          },
          "brand_name": {
            "type": "string",
            "nullable": true,
            "description": "Brand name"
          },
          "model_name": {
            "type": "string",
            "nullable": true,
            "description": "Model name"
          },
          "version_name": {
            "type": "string",
            "nullable": true,
            "description": "Version name"
          },
          "fuel_name": {
            "type": "string",
            "nullable": true,
            "description": "Fuel type name"
          }
        },
        "title": "MonitorVehicleOutputDto",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Monitor\\DTOs\\MonitorVehicleOutputDto"
      },
      "MonitorOutputDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Service order internal number"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "Document number, null for a draft"
          },
          "status": {
            "type": "string",
            "description": "Service order status code"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Service order date"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true,
            "description": "Customer ID"
          },
          "vehicle_plate": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle plate"
          },
          "invoice_name": {
            "type": "string",
            "nullable": true,
            "description": "Invoice name"
          },
          "expected_delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expected delivery date"
          },
          "awaiting_parts": {
            "type": "boolean",
            "description": "Awaiting parts flag"
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "Department name"
          },
          "priority": {
            "type": "integer",
            "nullable": true,
            "description": "Priority level"
          },
          "completion_percentage": {
            "type": "number",
            "format": "float",
            "description": "Completion percentage (0-100)"
          },
          "estimated_completion_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Estimated completion date based on working hours"
          },
          "interventions": {
            "$ref": "#/components/schemas/MonitorInterventionOutputDto"
          },
          "mechanics": {
            "$ref": "#/components/schemas/MonitorMechanicOutputDto"
          },
          "vehicle": {
            "$ref": "#/components/schemas/MonitorVehicleOutputDto"
          }
        },
        "title": "MonitorOutputDto",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Monitor\\DTOs\\MonitorOutputDto"
      },
      "MonitorServiceOrderMechanicOutputDto": {
        "type": "object",
        "properties": {
          "employee_code": {
            "type": "integer",
            "description": "Employee code"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Employee name"
          },
          "start_time": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Work start time"
          },
          "show_in_monitor": {
            "type": "boolean",
            "description": "Whether to display in monitor panel"
          }
        },
        "title": "MonitorServiceOrderMechanicOutputDto",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Monitor\\DTOs\\MonitorServiceOrderMechanicOutputDto"
      },
      "MonitorServiceOrderOutputDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Service order internal number"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "Document number"
          },
          "status": {
            "type": "string",
            "description": "Service order status (ESP, EXE, MAR)"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Service order date"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true,
            "description": "Customer ID"
          },
          "vehicle_plate": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle plate"
          },
          "invoice_name": {
            "type": "string",
            "nullable": true,
            "description": "Invoice name"
          },
          "expected_delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expected delivery date"
          },
          "awaiting_parts": {
            "type": "boolean",
            "description": "Awaiting parts flag"
          },
          "priority": {
            "type": "integer",
            "nullable": true,
            "description": "Priority level"
          },
          "completion_percentage": {
            "type": "number",
            "format": "float",
            "description": "Completion percentage (0-100, 2 decimal places)"
          },
          "estimated_completion_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Estimated completion date based on working hours"
          },
          "badge_color": {
            "type": "string",
            "nullable": true,
            "enum": [
              "success",
              "warning",
              "danger"
            ],
            "description": "Urgency badge color based on delivery date"
          },
          "interventions": {
            "$ref": "#/components/schemas/MonitorInterventionOutputDto"
          },
          "mechanics": {
            "$ref": "#/components/schemas/MonitorServiceOrderMechanicOutputDto"
          },
          "budgets": {
            "type": "array",
            "description": "Associated budgets/quotations"
          },
          "vehicle": {
            "$ref": "#/components/schemas/MonitorVehicleOutputDto"
          }
        },
        "title": "MonitorServiceOrderOutputDto",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Monitor\\DTOs\\MonitorServiceOrderOutputDto"
      },
      "ProcessStatusOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Status ID"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Status description"
          },
          "is_closing_status": {
            "type": "boolean",
            "description": "Whether this is a closing status"
          },
          "osv": {
            "type": "integer",
            "description": "1 when this status marks the service order stage, else 0"
          },
          "orc": {
            "type": "integer",
            "description": "1 when this status marks the budget stage, else 0"
          },
          "total": {
            "type": "integer",
            "description": "Number of processes with this status"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the status is active"
          }
        },
        "title": "ProcessStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Processes\\DTOs\\ProcessStatusOutputDTO"
      },
      "ObjectiveByEmployeeOutputDTO": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "integer"
          },
          "employee_name": {
            "type": "string",
            "nullable": true
          },
          "year": {
            "type": "integer"
          },
          "month": {
            "type": "integer"
          },
          "osv_hours": {
            "type": "number"
          },
          "task_hours": {
            "type": "number"
          },
          "total_hours": {
            "type": "number"
          },
          "objective_hours": {
            "type": "number"
          },
          "difference_hours": {
            "type": "number"
          },
          "achievement_percent": {
            "type": "number"
          }
        },
        "title": "ObjectiveByEmployeeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Relatorios\\Oficinas\\Objectives\\DTOs\\ObjectiveByEmployeeOutputDTO"
      },
      "ServiceOrderTimeOutputDTO": {
        "type": "object",
        "properties": {
          "month": {
            "type": "string"
          },
          "time_spent": {
            "type": "number"
          },
          "time_invoiced": {
            "type": "number"
          }
        },
        "title": "ServiceOrderTimeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\ServiceOrderTimeOutputDTO"
      },
      "VehiclesInParkStatusOutputDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "waiting",
              "in_execution",
              "awaiting_parts"
            ]
          },
          "count": {
            "type": "integer"
          }
        },
        "title": "VehiclesInParkStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\VehiclesInParkStatusOutputDTO"
      },
      "InvoicedServiceOrdersOutputDTO": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "total": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "warehouse_id": {
            "type": "integer"
          },
          "comparison": {
            "type": "object"
          },
          "history": {
            "type": "array"
          }
        },
        "title": "InvoicedServiceOrdersOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\InvoicedServiceOrdersOutputDTO"
      },
      "ServiceOrderStatusInterventionDTO": {
        "type": "object",
        "properties": {
          "sequence_number": {
            "type": "integer",
            "description": "Position of the intervention within the service order"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Intervention type description"
          },
          "extra_description": {
            "type": "string",
            "nullable": true,
            "description": "Free-text description typed on the order"
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "Department of the intervention type"
          },
          "is_executed": {
            "type": "boolean",
            "description": "Whether the intervention is done"
          },
          "estimated_time": {
            "type": "number",
            "nullable": true,
            "description": "Estimated time in minutes"
          },
          "priority": {
            "type": "integer",
            "nullable": true,
            "description": "Priority level; the board treats 5 as the neutral default and badges anything else"
          },
          "observations": {
            "type": "string",
            "nullable": true,
            "description": "Free-text note shown as a tooltip on the board"
          }
        },
        "title": "ServiceOrderStatusInterventionDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\ServiceOrderStatusInterventionDTO"
      },
      "ServiceOrderStatusMechanicDTO": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "integer",
            "description": "Employee code"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Employee name"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the mechanic clocked in on this order"
          },
          "show_in_monitor": {
            "type": "boolean",
            "description": "Whether the employee is flagged to appear on the workshop monitor"
          }
        },
        "title": "ServiceOrderStatusMechanicDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\ServiceOrderStatusMechanicDTO"
      },
      "ServiceOrderStatusBudgetDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Document number within its operation type"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "Printed document number"
          },
          "document_type": {
            "type": "string",
            "nullable": true,
            "description": "Operation type code"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Document date"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Computed document status"
          },
          "status_description": {
            "type": "string",
            "nullable": true,
            "description": "Translated status description"
          },
          "status_class": {
            "type": "string",
            "nullable": true,
            "description": "Status class label used for colouring"
          }
        },
        "title": "ServiceOrderStatusBudgetDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\ServiceOrderStatusBudgetDTO"
      },
      "ServiceOrderStatusVehicleDTO": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle plate"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle description"
          },
          "brand": {
            "type": "string",
            "nullable": true,
            "description": "Brand name"
          },
          "model": {
            "type": "string",
            "nullable": true,
            "description": "Model name"
          },
          "version": {
            "type": "string",
            "nullable": true,
            "description": "Version name"
          },
          "colour": {
            "type": "string",
            "nullable": true,
            "description": "Colour code used to tint the vehicle image"
          },
          "manufacturing_year": {
            "type": "integer",
            "nullable": true,
            "description": "Manufacturing year"
          },
          "km_counter": {
            "type": "number",
            "nullable": true,
            "description": "Current kilometre counter"
          }
        },
        "title": "ServiceOrderStatusVehicleDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\ServiceOrderStatusVehicleDTO"
      },
      "ServiceOrderStatusOutputDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Service order number"
          },
          "document_number": {
            "type": "string",
            "nullable": true,
            "description": "Printed document number"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Service order status code"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Reception date"
          },
          "expected_delivery_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expected delivery date"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true,
            "description": "Customer code"
          },
          "invoice_name": {
            "type": "string",
            "nullable": true,
            "description": "Invoice name"
          },
          "vehicle_plate": {
            "type": "string",
            "nullable": true,
            "description": "Plate as recorded on the order"
          },
          "awaiting_parts": {
            "type": "boolean",
            "description": "Whether the order is waiting for parts"
          },
          "priority": {
            "type": "integer",
            "nullable": true,
            "description": "Priority level"
          },
          "completion_percentage": {
            "type": "number",
            "description": "Percentage of interventions marked as done"
          },
          "badge_color": {
            "type": "string",
            "enum": [
              "success",
              "warning",
              "danger"
            ],
            "description": "Delivery urgency. Absent when the order has no expected delivery date"
          },
          "vehicle_image_url": {
            "type": "string",
            "nullable": true,
            "description": "Vehicle drawing used on the card. Only produced when the OFICINAS_RECECAO_ACTIVA module is active"
          },
          "interventions": {
            "$ref": "#/components/schemas/ServiceOrderStatusInterventionDTO"
          },
          "mechanics": {
            "$ref": "#/components/schemas/ServiceOrderStatusMechanicDTO"
          },
          "budgets": {
            "$ref": "#/components/schemas/ServiceOrderStatusBudgetDTO"
          },
          "vehicle": {
            "$ref": "#/components/schemas/ServiceOrderStatusVehicleDTO"
          }
        },
        "title": "ServiceOrderStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\DTOs\\ServiceOrderStatusOutputDTO"
      },
      "VehicleInParkOutputDTO": {
        "type": "object",
        "properties": {
          "service_order": {
            "type": "object",
            "description": "Service order in the park",
            "properties": {
              "number": {
                "type": "integer",
                "description": "Service order internal number"
              },
              "document_number": {
                "type": "string",
                "nullable": true,
                "description": "Document number, null for a draft"
              }
            }
          },
          "vehicle_ref": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "brand": {
            "type": "string",
            "description": "Vehicle brand name"
          },
          "model": {
            "type": "string",
            "description": "Vehicle model name"
          },
          "customer": {
            "type": "object",
            "description": "Billing customer of the service order"
          },
          "technician": {
            "type": "object",
            "description": "Assigned mechanic"
          },
          "entry_date": {
            "type": "string",
            "description": "Service order date (Y-m-d)"
          }
        },
        "title": "VehicleInParkOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Overview\\DTOs\\VehicleInParkOutputDTO"
      },
      "MaintenancePlanAlertOutputDTO": {
        "type": "object",
        "properties": {
          "plan_id": {
            "type": "integer",
            "description": "Maintenance plan id"
          },
          "vehicle_ref": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "limit_reading": {
            "type": "number",
            "description": "Counter reading that triggers the plan"
          },
          "current_reading": {
            "type": "number",
            "description": "Current vehicle counter reading"
          },
          "services": {
            "type": "string",
            "description": "Pending services, comma separated"
          },
          "service_count": {
            "type": "integer",
            "description": "Number of pending services"
          },
          "due_date": {
            "type": "string",
            "description": "Plan limit date (Y-m-d)"
          }
        },
        "title": "MaintenancePlanAlertOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Overview\\DTOs\\MaintenancePlanAlertOutputDTO"
      },
      "InspectionAlertOutputDTO": {
        "type": "object",
        "properties": {
          "vehicle_ref": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "brand": {
            "type": "string",
            "description": "Vehicle brand name"
          },
          "model": {
            "type": "string",
            "description": "Vehicle model name"
          },
          "owner": {
            "type": "object",
            "description": "Vehicle owner"
          },
          "due_date": {
            "type": "string",
            "description": "Next inspection date (Y-m-d)"
          }
        },
        "title": "InspectionAlertOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Overview\\DTOs\\InspectionAlertOutputDTO"
      },
      "InsuranceAlertOutputDTO": {
        "type": "object",
        "properties": {
          "vehicle_ref": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "due_date": {
            "type": "string",
            "description": "Insurance expiry date (Y-m-d)"
          },
          "policy_number": {
            "type": "string",
            "description": "Insurance policy number"
          }
        },
        "title": "InsuranceAlertOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Overview\\DTOs\\InsuranceAlertOutputDTO"
      },
      "RoadTaxAlertOutputDTO": {
        "type": "object",
        "properties": {
          "vehicle_ref": {
            "type": "string",
            "description": "Vehicle plate"
          },
          "due_date": {
            "type": "string",
            "description": "Road tax expiry date (Y-m-d)"
          },
          "last_cost": {
            "type": "number",
            "description": "Last road tax amount paid"
          }
        },
        "title": "RoadTaxAlertOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Overview\\DTOs\\RoadTaxAlertOutputDTO"
      },
      "DriverLicenceAlertOutputDTO": {
        "type": "object",
        "properties": {
          "driver_id": {
            "type": "integer",
            "description": "Driver contact id"
          },
          "name": {
            "type": "string",
            "description": "Driver name"
          },
          "due_date": {
            "type": "string",
            "description": "ADR licence expiry date (Y-m-d)"
          },
          "adr_number": {
            "type": "string",
            "description": "ADR licence number"
          }
        },
        "title": "DriverLicenceAlertOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Oficinas\\Overview\\DTOs\\DriverLicenceAlertOutputDTO"
      },
      "PurchaseDocumentOutputDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "serie": {
            "type": "string"
          },
          "serie_designation": {
            "type": "string",
            "nullable": true
          },
          "supplier_reference": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "registration_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "state": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "employee_code": {
            "type": "string"
          },
          "supplier_tax_id": {
            "type": "string",
            "nullable": true
          },
          "total": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "discount_value": {
            "type": "number"
          },
          "employee_name": {
            "type": "string",
            "nullable": true
          },
          "supplier_name": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "PurchaseDocumentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\PurchaseDocumentOutputDTO"
      },
      "PurchaseDocumentGroupOutputDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "nullable": true
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "title": "PurchaseDocumentGroupOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\PurchaseDocumentGroupOutputDTO"
      },
      "PurchaseArticleByDocumentOutputDTO": {
        "type": "object",
        "properties": {
          "document_number": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "serie": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "supplier_id": {
            "type": "string"
          },
          "supplier_name": {
            "type": "string",
            "nullable": true
          },
          "supplier_tax_id": {
            "type": "string",
            "nullable": true
          },
          "supplier_reference": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string"
          },
          "state_description": {
            "type": "string",
            "nullable": true
          },
          "line_number": {
            "type": "integer"
          },
          "article_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "article_type": {
            "type": "string",
            "nullable": true
          },
          "family": {
            "type": "string",
            "nullable": true
          },
          "family_description": {
            "type": "string",
            "nullable": true
          },
          "employee_name": {
            "type": "string",
            "nullable": true
          },
          "store": {
            "type": "string",
            "nullable": true
          },
          "cost_center_id": {
            "type": "string",
            "nullable": true,
            "description": "Cost center code. Only present when the Accounting module is active."
          },
          "cost_center_name": {
            "type": "string",
            "nullable": true,
            "description": "Cost center name. Only present when the Accounting module is active."
          }
        },
        "title": "PurchaseArticleByDocumentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\PurchaseArticleByDocumentOutputDTO"
      },
      "PurchaseArticlesByDocumentGroupOutputDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "title": "PurchaseArticlesByDocumentGroupOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\PurchaseArticlesByDocumentGroupOutputDTO"
      },
      "PurchasesByBillingSeriesOutputDTO": {
        "type": "object",
        "properties": {
          "granularity": {
            "type": "string"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "days": {
            "type": "integer"
          },
          "dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "serie": {
                  "type": "integer"
                },
                "name": {
                  "type": "string",
                  "nullable": true
                },
                "total": {
                  "type": "number"
                },
                "daily": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "totals_by_date": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "total": {
            "type": "number"
          }
        },
        "title": "PurchasesByBillingSeriesOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\PurchasesByBillingSeriesOutputDTO"
      },
      "TopCreditorOutputDTO": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "integer"
          },
          "supplier_name": {
            "type": "string",
            "nullable": true
          },
          "supplier_tax_id": {
            "type": "string",
            "nullable": true
          },
          "balance": {
            "type": "number"
          }
        },
        "title": "TopCreditorOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\TopCreditorOutputDTO"
      },
      "SupplierInvoiceDueOutputDTO": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "integer"
          },
          "supplier_reference": {
            "type": "string",
            "nullable": true
          },
          "supplier_id": {
            "type": "integer",
            "nullable": true
          },
          "supplier_name": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "total": {
            "type": "number"
          },
          "amount_paid": {
            "type": "number"
          },
          "amount_pending": {
            "type": "number"
          }
        },
        "title": "SupplierInvoiceDueOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\SupplierInvoiceDueOutputDTO"
      },
      "PurchasesSummaryOutputDTO": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "current_month": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            }
          },
          "previous_month": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            }
          },
          "monthly_average": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "from_month": {
                "type": "integer"
              },
              "to_month": {
                "type": "integer"
              },
              "months": {
                "type": "integer"
              }
            }
          },
          "current_year": {
            "type": "integer"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "purchases",
                    "goods",
                    "services",
                    "accounting"
                  ]
                },
                "current_month": {
                  "type": "number",
                  "nullable": true
                },
                "previous_month": {
                  "type": "number",
                  "nullable": true
                },
                "monthly_average": {
                  "type": "number",
                  "nullable": true
                },
                "current_year": {
                  "type": "number",
                  "nullable": true
                },
                "series": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "serie": {
                        "type": "integer",
                        "nullable": true
                      },
                      "name": {
                        "type": "string",
                        "nullable": true
                      },
                      "current_month": {
                        "type": "number",
                        "nullable": true
                      },
                      "previous_month": {
                        "type": "number",
                        "nullable": true
                      },
                      "monthly_average": {
                        "type": "number",
                        "nullable": true
                      },
                      "current_year": {
                        "type": "number",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "title": "PurchasesSummaryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Purchases\\Reports\\DTOs\\PurchasesSummaryOutputDTO"
      },
      "HrAbsenceTypeOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "is_hours": {
            "type": "boolean"
          },
          "is_days": {
            "type": "boolean"
          }
        },
        "title": "HrAbsenceTypeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\RHumanos\\Absences\\DTOs\\HrAbsenceTypeOutputDTO"
      },
      "HrAbsenceOutputDTO": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "integer"
          },
          "type": {
            "$ref": "#/components/schemas/HrAbsenceTypeOutputDTO"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "value": {
            "type": "number"
          },
          "observations": {
            "type": "string"
          }
        },
        "title": "HrAbsenceOutputDTO",
        "x-og-fqcn": "Og\\Modules\\RHumanos\\Absences\\DTOs\\HrAbsenceOutputDTO"
      },
      "HrVacationOutputDTO": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "integer"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "duration_days": {
            "type": "number"
          }
        },
        "title": "HrVacationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\RHumanos\\Vacations\\DTOs\\HrVacationOutputDTO"
      },
      "GetReceiptDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "serie": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "type_description": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "employee_code": {
            "type": "string"
          },
          "customer_tax_id": {
            "type": "string"
          },
          "vat_number": {
            "type": "string"
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string"
          },
          "is_canceled": {
            "type": "boolean"
          },
          "date_state": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "system_date": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "paid_value": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "observations": {
            "type": "string"
          },
          "hash_print": {
            "type": "string"
          },
          "email_sent": {
            "type": "boolean",
            "x-og-conditional": true
          },
          "pdf": {
            "type": "string",
            "x-og-conditional": true
          },
          "lines": {
            "type": "array"
          }
        },
        "title": "GetReceiptDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Receipts\\DTOs\\GetReceiptDTO"
      },
      "GetSaleDocumentDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "serie": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "general_type": {
            "type": "string"
          },
          "type_description": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "employee_code": {
            "type": "string"
          },
          "customer_tax_id": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "is_canceled": {
            "type": "boolean"
          },
          "date_state": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "system_date": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "paid_value": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "discount_2": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "number"
          },
          "reference": {
            "type": "string"
          },
          "observations": {
            "type": "string"
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "address_invoice_id": {
            "type": "string"
          },
          "invoice_address": {
            "type": "string"
          },
          "invoice_city": {
            "type": "string"
          },
          "invoice_zipcode": {
            "type": "string"
          },
          "invoice_country": {
            "type": "string"
          },
          "address_delivery_id": {
            "type": "string"
          },
          "delivery_address": {
            "type": "string"
          },
          "delivery_city": {
            "type": "string"
          },
          "delivery_zipcode": {
            "type": "string"
          },
          "delivery_country": {
            "type": "string"
          },
          "address_shipping_id": {
            "type": "string"
          },
          "load_address": {
            "type": "string"
          },
          "load_city": {
            "type": "string"
          },
          "load_zipcode": {
            "type": "string"
          },
          "load_country": {
            "type": "string"
          },
          "vehicle": {
            "type": "string"
          },
          "hash_print": {
            "type": "string"
          },
          "vat_number": {
            "type": "string"
          },
          "qrcode_string": {
            "type": "string"
          },
          "exchange_rate_date": {
            "type": "string"
          },
          "email_sent": {
            "type": "boolean"
          },
          "pdf": {
            "type": "string"
          },
          "plate": {
            "type": "string",
            "x-og-conditional": true
          },
          "wmso_flow": {
            "type": "string",
            "x-og-conditional": true
          },
          "wmso_route": {
            "type": "string",
            "x-og-conditional": true
          },
          "wmso_sended_wms": {
            "type": "string",
            "x-og-conditional": true
          },
          "wmso_in_conference": {
            "type": "string",
            "x-og-conditional": true
          },
          "wmso_urgent": {
            "type": "string",
            "x-og-conditional": true
          },
          "teccom_status": {
            "type": "string",
            "x-og-conditional": true
          },
          "insurer_id": {
            "type": "number",
            "x-og-conditional": true
          },
          "pwm_process_id": {
            "type": "number",
            "x-og-conditional": true
          },
          "lines": {
            "type": "array"
          }
        },
        "title": "GetSaleDocumentDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Documents\\DTOs\\GetSaleDocumentDTO"
      },
      "PendingPaymentOutputDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "customer_id": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "amount_paid": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "canceled": {
            "type": "boolean"
          },
          "debit_credit": {
            "type": "string"
          },
          "retention": {
            "type": "number"
          }
        },
        "title": "PendingPaymentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Others\\DTOs\\PendingPaymentOutputDTO"
      },
      "DirectEntryOutputDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "amount_paid": {
            "type": "number"
          },
          "pending_payment": {
            "type": "number"
          },
          "debit_credit": {
            "type": "string"
          }
        },
        "title": "DirectEntryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Others\\DTOs\\DirectEntryOutputDTO"
      },
      "SalesDocumentOutputDTO": {
        "type": "object",
        "properties": {
          "serie": {
            "type": "string"
          },
          "employee_code": {
            "type": "string"
          },
          "vendor_code": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "customer_tax_id": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "canceled": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "updated_stocks": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "updated_current_account": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "debit": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "credit": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "integrated": {
            "type": "string",
            "enum": [
              "0",
              "1"
            ]
          },
          "document_name": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "general_type": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "employee_name": {
            "type": "string",
            "nullable": true
          },
          "vendor_name": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "total": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "paid_value": {
            "type": "number"
          },
          "discount_value": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "discount_2": {
            "type": "number"
          }
        },
        "title": "SalesDocumentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\SalesDocumentOutputDTO"
      },
      "SalesArticleByDocumentOutputDTO": {
        "type": "object",
        "properties": {
          "document_number": {
            "type": "string"
          },
          "type_description": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "serie": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "customer_tax_id": {
            "type": "string"
          },
          "plate": {
            "type": "string",
            "nullable": true
          },
          "vehicle": {
            "type": "string",
            "nullable": true
          },
          "line_number": {
            "type": "integer"
          },
          "article_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "selling_price": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "discount_value": {
            "type": "number"
          },
          "average_cost_price": {
            "type": "number"
          },
          "profit_margin": {
            "type": "number"
          },
          "updated_current_account": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "updated_stocks": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "debit": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "credit": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "canceled": {
            "type": "string",
            "enum": [
              "T",
              "F"
            ]
          },
          "wmso_lines": {
            "type": "string",
            "nullable": true,
            "description": "WMSO status history of the document lines, as \"STATUS1#date2#\" entries separated by commas. Only present when wmso_lines_flag is sent and the document type has a lines table."
          },
          "signature_by": {
            "type": "string",
            "nullable": true
          },
          "signature_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cost_center_id": {
            "type": "string",
            "nullable": true,
            "description": "Cost center code. Only present when the Accounting module is active."
          },
          "cost_center_name": {
            "type": "string",
            "nullable": true,
            "description": "Cost center name. Only present when the Accounting module is active."
          }
        },
        "title": "SalesArticleByDocumentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\SalesArticleByDocumentOutputDTO"
      },
      "SalesArticlesByDocumentGroupOutputDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number"
          },
          "total_without_vat": {
            "type": "number"
          },
          "vat_value": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "title": "SalesArticlesByDocumentGroupOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\SalesArticlesByDocumentGroupOutputDTO"
      },
      "SalesByBillingSeriesOutputDTO": {
        "type": "object",
        "properties": {
          "granularity": {
            "type": "string"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "days": {
            "type": "integer"
          },
          "dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "serie": {
                  "type": "integer"
                },
                "name": {
                  "type": "string",
                  "nullable": true
                },
                "total": {
                  "type": "number"
                },
                "daily": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "totals_by_date": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "total": {
            "type": "number"
          }
        },
        "title": "SalesByBillingSeriesOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\SalesByBillingSeriesOutputDTO"
      },
      "DailySalesOutputDTO": {
        "type": "object",
        "title": "DailySalesOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\DailySalesOutputDTO"
      },
      "DailySalesDocumentOutputDTO": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "employee_name": {
            "type": "string",
            "nullable": true
          },
          "total_without_vat": {
            "type": "number"
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "state_name": {
            "type": "string",
            "nullable": true
          },
          "state_class": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "DailySalesDocumentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\DailySalesDocumentOutputDTO"
      },
      "SalesByArticleFamilyOutputDTO": {
        "type": "object",
        "properties": {
          "family_code": {
            "type": "string"
          },
          "family_name": {
            "type": "string"
          },
          "total": {
            "type": "number"
          }
        },
        "title": "SalesByArticleFamilyOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\SalesByArticleFamilyOutputDTO"
      },
      "TopCustomersOutputDTO": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer"
          },
          "month": {
            "type": "integer",
            "nullable": true
          },
          "customers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "customer_id": {
                  "type": "integer"
                },
                "customer_name": {
                  "type": "string",
                  "nullable": true
                },
                "total": {
                  "type": "number"
                },
                "percentage": {
                  "type": "number"
                }
              }
            }
          },
          "total": {
            "type": "number"
          }
        },
        "title": "TopCustomersOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\TopCustomersOutputDTO"
      },
      "TopSellingArticleOutputDTO": {
        "type": "object",
        "properties": {
          "article_code": {
            "type": "string"
          },
          "article_name": {
            "type": "string"
          },
          "total": {
            "type": "number"
          }
        },
        "title": "TopSellingArticleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\TopSellingArticleOutputDTO"
      },
      "SalesByYearOutputDTO": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer"
          },
          "total": {
            "type": "number"
          }
        },
        "title": "SalesByYearOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\SalesByYearOutputDTO"
      },
      "CustomerInvoiceDueOutputDTO": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "total": {
            "type": "number"
          },
          "amount_paid": {
            "type": "number"
          },
          "amount_pending": {
            "type": "number"
          }
        },
        "title": "CustomerInvoiceDueOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\CustomerInvoiceDueOutputDTO"
      },
      "TopDebtorOutputDTO": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "customer_tax_id": {
            "type": "string",
            "nullable": true
          },
          "balance": {
            "type": "number"
          }
        },
        "title": "TopDebtorOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\TopDebtorOutputDTO"
      },
      "ProfitOutputDTO": {
        "type": "object",
        "properties": {
          "month": {
            "type": "integer"
          },
          "year": {
            "type": "integer"
          },
          "from_month": {
            "type": "integer"
          },
          "from_year": {
            "type": "integer"
          },
          "to_month": {
            "type": "integer"
          },
          "to_year": {
            "type": "integer"
          },
          "total": {
            "type": "number"
          },
          "profit": {
            "type": "number"
          }
        },
        "title": "ProfitOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\ProfitOutputDTO"
      },
      "CashFlowSummaryOutputDTO": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "current_month": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            }
          },
          "previous_month": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            }
          },
          "monthly_average": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "from_month": {
                "type": "integer"
              },
              "to_month": {
                "type": "integer"
              },
              "months": {
                "type": "integer"
              }
            }
          },
          "current_year": {
            "type": "integer"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "receipts",
                    "payments"
                  ]
                },
                "current_month": {
                  "type": "number",
                  "nullable": true
                },
                "previous_month": {
                  "type": "number",
                  "nullable": true
                },
                "monthly_average": {
                  "type": "number",
                  "nullable": true
                },
                "current_year": {
                  "type": "number",
                  "nullable": true
                },
                "series": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "serie": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string",
                        "nullable": true
                      },
                      "current_month": {
                        "type": "number",
                        "nullable": true
                      },
                      "previous_month": {
                        "type": "number",
                        "nullable": true
                      },
                      "monthly_average": {
                        "type": "number",
                        "nullable": true
                      },
                      "current_year": {
                        "type": "number",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "title": "CashFlowSummaryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\CashFlowSummaryOutputDTO"
      },
      "SalesSummaryOutputDTO": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "current_month": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            }
          },
          "previous_month": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              }
            }
          },
          "monthly_average": {
            "type": "object",
            "properties": {
              "year": {
                "type": "integer"
              },
              "from_month": {
                "type": "integer"
              },
              "to_month": {
                "type": "integer"
              },
              "months": {
                "type": "integer"
              }
            }
          },
          "current_year": {
            "type": "integer"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "billing",
                    "goods",
                    "services",
                    "goods_profit"
                  ]
                },
                "current_month": {
                  "type": "number",
                  "nullable": true
                },
                "previous_month": {
                  "type": "number",
                  "nullable": true
                },
                "monthly_average": {
                  "type": "number",
                  "nullable": true
                },
                "current_year": {
                  "type": "number",
                  "nullable": true
                },
                "series": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "serie": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string",
                        "nullable": true
                      },
                      "current_month": {
                        "type": "number",
                        "nullable": true
                      },
                      "previous_month": {
                        "type": "number",
                        "nullable": true
                      },
                      "monthly_average": {
                        "type": "number",
                        "nullable": true
                      },
                      "current_year": {
                        "type": "number",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "title": "SalesSummaryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\SalesSummaryOutputDTO"
      },
      "PendingProvisionalReceiptOutputDTO": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "total": {
            "type": "number"
          }
        },
        "title": "PendingProvisionalReceiptOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\PendingProvisionalReceiptOutputDTO"
      },
      "MonthlySalesGoalOutputDTO": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "integer",
            "nullable": true
          },
          "commercial_id": {
            "type": "integer",
            "nullable": true
          },
          "year": {
            "type": "integer"
          },
          "month": {
            "type": "integer"
          },
          "goal": {
            "type": "number"
          },
          "achieved": {
            "type": "number"
          },
          "percentage_achieved": {
            "type": "number",
            "nullable": true
          },
          "remaining": {
            "type": "number"
          },
          "percentage_remaining": {
            "type": "number",
            "nullable": true
          }
        },
        "title": "MonthlySalesGoalOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\MonthlySalesGoalOutputDTO"
      },
      "GoalsByBillingSeriesOutputDTO": {
        "type": "object",
        "properties": {
          "metric": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "month": {
            "type": "integer",
            "nullable": true
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "serie": {
                  "type": "integer"
                },
                "name": {
                  "type": "string",
                  "nullable": true
                },
                "goal": {
                  "type": "number"
                },
                "achieved": {
                  "type": "number"
                },
                "remaining": {
                  "type": "number"
                },
                "percentage_achieved": {
                  "type": "number"
                },
                "percentage_remaining": {
                  "type": "number"
                }
              }
            }
          }
        },
        "title": "GoalsByBillingSeriesOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Sales\\Reports\\DTOs\\GoalsByBillingSeriesOutputDTO"
      },
      "SocialIncidentOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "customer": {
            "type": "integer",
            "nullable": true
          },
          "employee": {
            "type": "integer",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "hour": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "resolved": {
            "type": "string",
            "nullable": true
          },
          "observations": {
            "type": "string",
            "nullable": true
          },
          "private": {
            "type": "boolean",
            "nullable": true
          }
        },
        "title": "SocialIncidentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Social\\Reports\\DTOs\\SocialIncidentOutputDTO"
      },
      "SocialMedicineOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "medication": {
            "type": "string",
            "nullable": true
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "fasting": {
            "nullable": true
          },
          "breakfast": {
            "nullable": true
          },
          "lunch": {
            "nullable": true
          },
          "snack": {
            "nullable": true
          },
          "dinner": {
            "nullable": true
          },
          "supper": {
            "nullable": true
          },
          "periodicity": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "string",
            "nullable": true
          },
          "observation": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "SocialMedicineOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Social\\Reports\\DTOs\\SocialMedicineOutputDTO"
      },
      "ArticleSearchOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Article code",
            "example": "ART001"
          },
          "barcode": {
            "type": "string",
            "nullable": true,
            "description": "Primary barcode",
            "example": "5601234567890"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Article description",
            "example": "Produto A"
          },
          "article_type": {
            "type": "string",
            "nullable": true,
            "description": "Article type code",
            "example": "N"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the article is active",
            "example": true
          },
          "use_lots": {
            "type": "boolean",
            "description": "Whether the article uses lots",
            "example": false
          },
          "barcodes": {
            "type": "array",
            "description": "All barcodes including extras",
            "example": [
              "5601234567890"
            ]
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "Article image URL",
            "example": "https://host/loadupload/artigos/_ART001.jpg"
          },
          "sector_id": {
            "type": "integer",
            "nullable": true,
            "description": "Sector id when SETORES module is active",
            "example": 12
          },
          "sector_description": {
            "type": "string",
            "nullable": true,
            "description": "Sector description",
            "example": "Corredor 3"
          },
          "sector_barcode": {
            "type": "string",
            "nullable": true,
            "description": "Sector barcode",
            "example": "C3"
          },
          "barcode_prefix": {
            "type": "string",
            "nullable": true,
            "description": "Article configured barcode prefix",
            "example": "20"
          },
          "prefix_search": {
            "type": "string",
            "nullable": true,
            "description": "Prefix resolved from the searched barcode",
            "example": "20"
          },
          "prefix_value": {
            "type": "string",
            "nullable": true,
            "description": "Value resolved from the searched barcode",
            "example": "00123"
          },
          "prefix_type": {
            "type": "string",
            "nullable": true,
            "description": "Prefix type: P (price) or Q (quantity)",
            "example": "P"
          }
        },
        "title": "ArticleSearchOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleSearchOutputDTO"
      },
      "ArticleWarehouseOutputDTO": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "integer"
          },
          "warehouse_name": {
            "type": "string"
          },
          "stock_qty": {
            "type": "number",
            "format": "float"
          },
          "client_ordered_qty": {
            "type": "number",
            "format": "float"
          },
          "supplier_ordered_qty": {
            "type": "number",
            "format": "float"
          },
          "min_stock": {
            "type": "number",
            "format": "float"
          },
          "max_stock": {
            "type": "number",
            "format": "float"
          },
          "replenishment_qty": {
            "type": "number",
            "format": "float"
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "supplier_id": {
            "type": "integer",
            "nullable": true
          },
          "supplier_name": {
            "type": "string",
            "nullable": true
          },
          "sector_id": {
            "type": "integer",
            "nullable": true,
            "x-og-module": "SETORES"
          },
          "sector_description": {
            "type": "string",
            "x-og-module": "SETORES"
          },
          "sector_barcode": {
            "type": "string",
            "x-og-module": "SETORES"
          },
          "abc": {
            "type": "string",
            "nullable": true,
            "x-og-module": "WMSO"
          }
        },
        "title": "ArticleWarehouseOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleWarehouseOutputDTO"
      },
      "ArticleEquivalentDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "ArticleEquivalentDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleEquivalentDTO"
      },
      "ArticleEquivalentGroupDTO": {
        "type": "object",
        "properties": {
          "group_id": {
            "type": "integer"
          },
          "articles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArticleEquivalentDTO"
            }
          }
        },
        "title": "ArticleEquivalentGroupDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleEquivalentGroupDTO"
      },
      "ArticleSerialNumberDTO": {
        "type": "object",
        "properties": {
          "serial_number": {
            "type": "string"
          },
          "in_stock": {
            "type": "boolean"
          },
          "warehouse_id": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "ArticleSerialNumberDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleSerialNumberDTO"
      },
      "ArticleSetDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number"
          },
          "mandatory": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "family_id": {
            "type": "string",
            "nullable": true
          },
          "sub_family_id": {
            "type": "string",
            "nullable": true
          },
          "sub_sub_family_id": {
            "type": "string",
            "nullable": true
          },
          "brand_id": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "ArticleSetDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleSetDTO"
      },
      "ArticleKitDTO": {
        "type": "object",
        "properties": {
          "line": {
            "type": "integer"
          },
          "article_id": {
            "type": "string"
          },
          "article_b64_id": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "selling_price": {
            "type": "number",
            "nullable": true
          },
          "cost_price": {
            "type": "number",
            "nullable": true
          },
          "cost_price_medium": {
            "type": "number",
            "nullable": true
          },
          "use_serial_numbers": {
            "type": "boolean"
          },
          "use_lots": {
            "type": "boolean"
          }
        },
        "title": "ArticleKitDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleKitDTO"
      },
      "ArticleSupplierDTO": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "integer"
          },
          "supplier_name": {
            "type": "string",
            "nullable": true
          },
          "preferential": {
            "type": "boolean"
          },
          "supplier_number_id": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "nullable": true
          },
          "discount1": {
            "type": "number",
            "nullable": true
          },
          "discount2": {
            "type": "number",
            "nullable": true
          },
          "discount3": {
            "type": "number"
          },
          "discount4": {
            "type": "number"
          },
          "discount5": {
            "type": "number"
          }
        },
        "title": "ArticleSupplierDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleSupplierDTO"
      },
      "ArticleNoteOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Note unique identifier"
          },
          "article_id": {
            "type": "string",
            "description": "Associated article code"
          },
          "subject": {
            "type": "string",
            "description": "Note subject/tittle"
          },
          "text": {
            "type": "string",
            "description": "Note content text"
          },
          "notify_sale": {
            "type": "boolean",
            "description": "Notify on sale transactions"
          },
          "notify_purchase": {
            "type": "boolean",
            "description": "Notify on purchase transactions"
          },
          "author_id": {
            "type": "string",
            "description": "Author employee code"
          },
          "created_by": {
            "type": "string",
            "description": "Creation user"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "updated_by": {
            "type": "string",
            "description": "Last update user"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp"
          }
        },
        "title": "ArticleNoteOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Articles\\DTOs\\ArticleNoteOutputDTO"
      },
      "StockMovementOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Movement identifier"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Movement description"
          },
          "movement_type": {
            "type": "object",
            "nullable": true,
            "description": "Movement type"
          },
          "warehouse_enter": {
            "type": "object",
            "nullable": true,
            "description": "Entry warehouse"
          },
          "warehouse_exit": {
            "type": "object",
            "nullable": true,
            "description": "Exit warehouse"
          },
          "annulled": {
            "type": "boolean",
            "description": "Whether the movement is annulled"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Movement date"
          },
          "register_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Registration date"
          }
        },
        "title": "StockMovementOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Movements\\DTOs\\StockMovementOutputDTO"
      },
      "StockMovementTypeOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Movement type code",
            "example": "E"
          },
          "description": {
            "type": "string",
            "description": "Movement type designation",
            "example": "Entrada"
          },
          "type": {
            "type": "string",
            "description": "Movement base type: E (Entry), S (Exit), T (Transfer)",
            "example": "E"
          }
        },
        "title": "StockMovementTypeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\MovementsTypes\\DTOs\\StockMovementTypeOutputDTO"
      },
      "StockQuantityOutputDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string",
            "description": "Article code",
            "example": "ART001"
          },
          "article": {
            "type": "string",
            "nullable": true,
            "description": "Article designation",
            "example": "Produto A"
          },
          "warehouse_id": {
            "type": "integer",
            "description": "Warehouse identifier",
            "example": 1
          },
          "warehouse": {
            "type": "string",
            "description": "Warehouse name",
            "example": "Armazém Principal"
          },
          "quantity": {
            "type": "number",
            "description": "Current stock quantity",
            "example": 50
          },
          "quantity_order_customer": {
            "type": "number",
            "description": "Quantity ordered by customers (pending)",
            "example": 5
          },
          "quantity_order_supplier": {
            "type": "number",
            "description": "Quantity ordered from suppliers (pending)",
            "example": 10
          }
        },
        "title": "StockQuantityOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Quantities\\DTOs\\StockQuantityOutputDTO"
      },
      "StockQuantityWarehouseOutputDTO": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "integer",
            "description": "Warehouse identifier",
            "example": 1
          },
          "quantity": {
            "type": "number",
            "description": "Current stock quantity",
            "example": 20
          },
          "quantity_order_customer": {
            "type": "number",
            "description": "Quantity ordered by customers (pending)",
            "example": 2
          },
          "quantity_order_supplier": {
            "type": "number",
            "description": "Quantity ordered from suppliers (pending)",
            "example": 5
          }
        },
        "title": "StockQuantityWarehouseOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Quantities\\DTOs\\StockQuantityWarehouseOutputDTO"
      },
      "StockQuantitySearchOutputDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string",
            "description": "Article code",
            "example": "ART001"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Article designation (with with_article_data)",
            "example": "Produto A"
          },
          "price": {
            "type": "number",
            "nullable": true,
            "description": "Selling price (with with_article_data)",
            "example": 9.99
          },
          "use_lots": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the article uses lots",
            "example": false
          },
          "barcodes": {
            "type": "array",
            "nullable": true,
            "description": "All barcodes (with with_article_data)",
            "example": [
              "5601234567890"
            ]
          },
          "total_quantity": {
            "type": "number",
            "description": "Sum of quantities across all warehouses",
            "example": 25
          },
          "warehouses": {
            "type": "array",
            "description": "Array of per-warehouse stock",
            "items": {
              "$ref": "#/components/schemas/StockQuantityWarehouseOutputDTO"
            }
          }
        },
        "title": "StockQuantitySearchOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Quantities\\DTOs\\StockQuantitySearchOutputDTO"
      },
      "BarcodePrefixOutputDTO": {
        "type": "object",
        "properties": {
          "prefix": {
            "type": "string",
            "description": "Prefix code (up to 3 characters)",
            "example": "20"
          },
          "barcode_digits": {
            "type": "integer",
            "nullable": true,
            "description": "Total barcode digits",
            "example": 13
          },
          "value_digits": {
            "type": "integer",
            "nullable": true,
            "description": "Digits used for the value portion",
            "example": 5
          },
          "decimal_places": {
            "type": "integer",
            "nullable": true,
            "description": "Decimal places applied to the value",
            "example": 3
          },
          "type": {
            "type": "string",
            "nullable": true,
            "description": "Prefix type: P (price) or Q (quantity)",
            "example": "P"
          }
        },
        "title": "BarcodePrefixOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\BarcodePrefixes\\DTOs\\BarcodePrefixOutputDTO"
      },
      "RecountOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Recount identifier"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Recount description"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Recount date"
          },
          "status": {
            "type": "string",
            "description": "Status: A (open), F (closed)",
            "example": "A"
          },
          "warehouse_id": {
            "type": "integer",
            "nullable": true,
            "description": "Warehouse identifier"
          },
          "warehouse": {
            "type": "object",
            "nullable": true,
            "description": "Warehouse data"
          },
          "family_id": {
            "type": "string",
            "nullable": true,
            "description": "Family code"
          },
          "family_name": {
            "type": "string",
            "nullable": true,
            "description": "Family description"
          },
          "sub_family_id": {
            "type": "string",
            "nullable": true,
            "description": "Subfamily code"
          },
          "sub_family_name": {
            "type": "string",
            "nullable": true,
            "description": "Subfamily description"
          },
          "brand_id": {
            "type": "string",
            "nullable": true,
            "description": "Brand filter"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Registration date"
          },
          "sector_id": {
            "type": "integer",
            "nullable": true,
            "description": "Sector identifier (SETORES module)"
          },
          "sector_name": {
            "type": "string",
            "nullable": true,
            "description": "Sector description (SETORES module)"
          },
          "sector_barcode": {
            "type": "string",
            "nullable": true,
            "description": "Sector barcode (SETORES module)"
          }
        },
        "title": "RecountOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Recounts\\DTOs\\RecountOutputDTO"
      },
      "RecountShowOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Recount identifier"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Recount description"
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Recount date"
          },
          "status": {
            "type": "string",
            "description": "Status: A (open), F (closed)",
            "example": "A"
          },
          "warehouse_id": {
            "type": "integer",
            "nullable": true,
            "description": "Warehouse identifier"
          },
          "warehouse": {
            "type": "object",
            "nullable": true,
            "description": "Warehouse data"
          },
          "family_id": {
            "type": "string",
            "nullable": true,
            "description": "Family code"
          },
          "family_name": {
            "type": "string",
            "nullable": true,
            "description": "Family description"
          },
          "sub_family_id": {
            "type": "string",
            "nullable": true,
            "description": "Subfamily code"
          },
          "sub_family_name": {
            "type": "string",
            "nullable": true,
            "description": "Subfamily description"
          },
          "brand_id": {
            "type": "string",
            "nullable": true,
            "description": "Brand filter"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Registration date"
          },
          "sector_id": {
            "type": "integer",
            "nullable": true,
            "description": "Sector identifier (SETORES module)"
          },
          "sector_name": {
            "type": "string",
            "nullable": true,
            "description": "Sector description (SETORES module)"
          },
          "sector_barcode": {
            "type": "string",
            "nullable": true,
            "description": "Sector barcode (SETORES module)"
          },
          "lines": {
            "type": "array",
            "description": "Recount article lines",
            "items": {
              "type": "object",
              "properties": {
                "article_id": {
                  "type": "string",
                  "description": "Article identifier"
                },
                "barcode": {
                  "type": "string",
                  "nullable": true,
                  "description": "Article barcode"
                },
                "description": {
                  "type": "string",
                  "nullable": true,
                  "description": "Article description"
                },
                "has_lot": {
                  "type": "boolean",
                  "description": "Whether the article uses lots"
                },
                "lot": {
                  "type": "string",
                  "nullable": true,
                  "description": "Lot identifier"
                },
                "quantity": {
                  "type": "number",
                  "format": "float",
                  "description": "Counted quantity"
                },
                "qty_expected": {
                  "type": "number",
                  "format": "float",
                  "description": "Expected stock quantity"
                },
                "unit_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "Unit of measure"
                }
              }
            }
          }
        },
        "title": "RecountShowOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Recounts\\DTOs\\RecountShowOutputDTO"
      },
      "TecdocEquivalentOutputDTO": {
        "type": "object",
        "properties": {
          "article_number": {
            "type": "string",
            "nullable": true
          },
          "article_id": {
            "type": "string",
            "nullable": true
          },
          "article_name": {
            "type": "string",
            "nullable": true
          },
          "brand_name": {
            "type": "string",
            "nullable": true
          },
          "brand_number": {
            "type": "string",
            "nullable": true
          },
          "og_article_code": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "TecdocEquivalentOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Tecdoc\\DTOs\\TecdocEquivalentOutputDTO"
      },
      "TecdocArticleOutputDTO": {
        "type": "object",
        "properties": {
          "article_id": {
            "type": "string"
          },
          "article_number": {
            "type": "string",
            "nullable": true
          },
          "article_name": {
            "type": "string",
            "nullable": true
          },
          "brand_name": {
            "type": "string",
            "nullable": true
          },
          "brand_number": {
            "type": "string",
            "nullable": true
          },
          "barcodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "image_url": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "TecdocArticleOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Stocks\\Tecdoc\\DTOs\\TecdocArticleOutputDTO"
      },
      "TablesOrganizationalDepartmentsOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Department identifier"
          },
          "name": {
            "type": "string",
            "description": "Department name"
          },
          "observations": {
            "type": "string",
            "description": "Observations"
          },
          "labor_article_id": {
            "type": "string",
            "description": "Labor article ID"
          },
          "cost_center_id": {
            "type": "string",
            "description": "Cost center ID"
          },
          "responsible_id": {
            "type": "integer",
            "description": "Responsible employee ID"
          },
          "show_on_workshop_agenda": {
            "type": "boolean",
            "description": "Show on agenda"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "TablesOrganizationalDepartmentsOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Organizational\\Departments\\DTO\\TablesOrganizationalDepartmentsOutputDTO"
      },
      "TablesOrganizationalWarehouseOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Warehouse/store code"
          },
          "name": {
            "type": "string",
            "description": "Warehouse/store name"
          },
          "address": {
            "type": "string",
            "description": "Address"
          },
          "city": {
            "type": "string",
            "description": "City"
          },
          "postal_code": {
            "type": "string",
            "description": "Postal code"
          },
          "responsible_id": {
            "type": "string",
            "description": "Responsible person code"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the store is active"
          },
          "is_available_scheduling": {
            "type": "boolean",
            "description": "Whether the store is available for scheduling"
          }
        },
        "title": "TablesOrganizationalWarehouseOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Organizational\\Warehouses\\DTOs\\TablesOrganizationalWarehouseOutputDTO"
      },
      "TablesOrganizationalLocationOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Location identifier"
          },
          "warehouse_id": {
            "type": "integer",
            "description": "Warehouse id (lojas.CodLoja)"
          },
          "name": {
            "type": "string",
            "description": "Location description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "TablesOrganizationalLocationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Organizational\\Locations\\DTOs\\TablesOrganizationalLocationOutputDTO"
      },
      "ShippingMethodOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Shipping method identifier"
          },
          "description": {
            "type": "string",
            "description": "Shipping method name"
          }
        },
        "title": "ShippingMethodOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Organizational\\ShippingMethods\\DTOs\\ShippingMethodOutputDTO"
      },
      "CashOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Cash register identifier"
          },
          "description": {
            "type": "string",
            "description": "Cash register name"
          },
          "bank_cash_id": {
            "type": "string",
            "description": "Bank code for cash"
          },
          "account_bank_cash_id": {
            "type": "string",
            "description": "Bank account code for cash"
          },
          "bank_atm_id": {
            "type": "string",
            "description": "Bank code for ATM"
          },
          "account_bank_atm_id": {
            "type": "string",
            "description": "Bank account code for ATM"
          },
          "id_bank_cash": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated (sunset 2027-02-28), use bank_cash_id."
          },
          "id_account_bank_cash": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated (sunset 2027-02-28), use account_bank_cash_id."
          },
          "id_bank_atm": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated (sunset 2027-02-28), use bank_atm_id."
          },
          "id_account_bank_atm": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated (sunset 2027-02-28), use account_bank_atm_id."
          },
          "opening_balance": {
            "type": "number",
            "description": "Opening balance (requires BANCOS module)"
          }
        },
        "title": "CashOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Organizational\\Cashs\\DTOs\\CashOutputDTO"
      },
      "VatOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "VAT rate identifier"
          },
          "description": {
            "type": "string",
            "description": "VAT rate description"
          },
          "value": {
            "type": "number",
            "format": "decimal",
            "description": "VAT percentage value"
          },
          "tax_type": {
            "type": "string",
            "description": "Tax type classification"
          },
          "saft_tax_code": {
            "type": "string",
            "description": "SAF-T tax code"
          },
          "tax_web_id": {
            "type": "integer",
            "description": "PrestaShop tax mapping identifier"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "VatOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\Vats\\DTOs\\VatOutputDTO"
      },
      "ExemptionReasonOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Exemption reason identifier"
          },
          "description": {
            "type": "string",
            "description": "Exemption reason description"
          },
          "saft_code": {
            "type": "string",
            "description": "SAF-T exemption code"
          },
          "applied_standard": {
            "type": "string",
            "description": "Applied legal standard"
          },
          "vat_value": {
            "type": "number",
            "format": "decimal",
            "description": "Associated VAT value"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the exemption reason is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "ExemptionReasonOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\ExemptionReasons\\DTOs\\ExemptionReasonOutputDTO"
      },
      "PaymentMethodOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Payment method identifier"
          },
          "description": {
            "type": "string",
            "description": "Payment method description"
          },
          "days": {
            "type": "integer",
            "description": "Numeric value: days to add (days/calculate_days) or day of month (fix_day)"
          },
          "payment_term_type": {
            "type": "string",
            "description": "Due date calculation type: days | calculate_days | fix_day"
          },
          "calc_base": {
            "type": "string",
            "description": "Base for calculate_days: first_day_next_month | last_day_next_month | last_day_this_month"
          },
          "fix_day_months": {
            "type": "integer",
            "description": "Month offset for fix_day (1|2|3)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "PaymentMethodOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\PaymentMethods\\DTOs\\PaymentMethodOutputDTO"
      },
      "PaymentModeOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Payment mode identifier"
          },
          "description": {
            "type": "string",
            "description": "Payment mode description"
          },
          "base_mode": {
            "type": "string",
            "description": "Base payment mode classification"
          },
          "saft_payment_mechanism": {
            "type": "string",
            "description": "SAF-T payment mechanism code"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the payment mode is active"
          },
          "is_active_tpv": {
            "type": "boolean",
            "description": "Whether the payment mode is active for POS"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "PaymentModeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\PaymentModes\\DTOs\\PaymentModeOutputDTO"
      },
      "BankOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Bank identifier"
          },
          "description": {
            "type": "string",
            "description": "Bank name"
          },
          "swift_code": {
            "type": "string",
            "description": "SWIFT/BIC code"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "BankOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\Banks\\DTOs\\BankOutputDTO"
      },
      "BankAccountOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Bank account identifier"
          },
          "description": {
            "type": "string",
            "description": "Account description"
          },
          "bank_id": {
            "type": "string",
            "description": "Associated bank identifier"
          },
          "currency_id": {
            "type": "string",
            "description": "Currency identifier"
          },
          "account_type": {
            "type": "string",
            "description": "Account type"
          },
          "nib": {
            "type": "string",
            "description": "NIB number"
          },
          "iban": {
            "type": "string",
            "description": "IBAN number"
          },
          "is_cash_account": {
            "type": "boolean",
            "description": "Whether this is a cash account"
          },
          "country_id": {
            "type": "string",
            "description": "Country identifier"
          },
          "is_atm_account": {
            "type": "boolean",
            "description": "Whether this is an ATM account"
          },
          "is_transfer_account": {
            "type": "boolean",
            "description": "Whether this is a transfer account"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the account is active"
          },
          "accounting_account": {
            "type": "string",
            "description": "Accounting ledger account number"
          },
          "payments_account_number": {
            "type": "string",
            "description": "Payments account number"
          },
          "opening_balance": {
            "type": "number",
            "format": "decimal",
            "description": "Opening balance amount"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "BankAccountOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\BankAccounts\\DTOs\\BankAccountOutputDTO"
      },
      "DocumentReasonOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Document reason identifier"
          },
          "reason": {
            "type": "string",
            "description": "Reason description"
          },
          "is_credit_note": {
            "type": "boolean",
            "description": "Whether applicable to credit notes"
          },
          "is_cancellation": {
            "type": "boolean",
            "description": "Whether applicable to cancellations"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the reason is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "DocumentReasonOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\DocumentReasons\\DTOs\\DocumentReasonOutputDTO"
      },
      "DocumentTypeOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Document type physical name (primary key)"
          },
          "abbreviation": {
            "type": "string",
            "description": "Abbreviated code"
          },
          "name": {
            "type": "string",
            "description": "Document type name"
          },
          "is_purchase": {
            "type": "boolean",
            "description": "Whether it is a purchase document"
          },
          "is_stock_update": {
            "type": "boolean",
            "description": "Whether it updates stock"
          },
          "is_stock_additive": {
            "type": "boolean",
            "description": "Whether it adds to stock"
          },
          "has_payment_method": {
            "type": "boolean",
            "description": "Whether it uses payment method"
          },
          "is_account_update": {
            "type": "boolean",
            "description": "Whether it updates current account"
          },
          "is_debit": {
            "type": "boolean",
            "description": "Whether it debits"
          },
          "is_credit": {
            "type": "boolean",
            "description": "Whether it credits"
          },
          "has_ceiling_control": {
            "type": "boolean",
            "description": "Whether it controls ceiling/plafond"
          },
          "is_saft_included": {
            "type": "boolean",
            "description": "Whether included in SAFT"
          },
          "is_hash_generated": {
            "type": "boolean",
            "description": "Whether hash is generated"
          },
          "saft_type": {
            "type": "string",
            "description": "SAFT document type"
          },
          "is_tax_authority_reportable": {
            "type": "boolean",
            "description": "Whether reported to tax authority"
          },
          "is_api_visible": {
            "type": "boolean",
            "description": "Whether visible in API"
          },
          "is_api_creatable": {
            "type": "boolean",
            "description": "Whether creatable via API"
          },
          "is_menu_visible": {
            "type": "boolean",
            "description": "Whether visible in menu"
          },
          "is_receipt": {
            "type": "boolean",
            "description": "Whether it is a receipt"
          },
          "layout": {
            "type": "string",
            "description": "Document layout"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "DocumentTypeOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\DocumentTypes\\DTOs\\DocumentTypeOutputDTO"
      },
      "DocumentStatusOutputDTO": {
        "type": "object",
        "properties": {
          "document_type": {
            "type": "string",
            "description": "Physical name of the document type the status belongs to, as stored in TransEstados"
          },
          "code": {
            "type": "string",
            "description": "Status code, the value the filters of other endpoints expect"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Status description resolved for the language of the request: the states table keeps a dictionary key beside the stored designation and the key wins when present, the same rule the legacy screens apply. Null when the status has no row in the states table"
          },
          "class_label": {
            "type": "string",
            "nullable": true,
            "description": "Badge style the legacy screens use for this status"
          },
          "is_initial": {
            "type": "boolean",
            "description": "Whether the status is where a document of this type starts, so no transition reaches it"
          }
        },
        "title": "DocumentStatusOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Financial\\DocumentStatuses\\DTOs\\DocumentStatusOutputDTO"
      },
      "TablesGeographicalCountryOutputDTO": {
        "type": "object",
        "properties": {
          "country_code": {
            "type": "string",
            "description": "ISO country code"
          },
          "name": {
            "type": "string",
            "description": "Country name"
          },
          "currency_code": {
            "type": "string",
            "description": "Currency code"
          },
          "saft_country_id": {
            "type": "string",
            "description": "SAF-T country identifier"
          },
          "fiscal_zone_code": {
            "type": "string",
            "description": "Fiscal zone code"
          },
          "phone_prefix": {
            "type": "string",
            "description": "International phone prefix"
          },
          "phone_length": {
            "type": "integer",
            "description": "Phone number length"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "TablesGeographicalCountryOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Geographical\\Countries\\DTOs\\TablesGeographicalCountryOutputDTO"
      },
      "TablesGeographicalDistrictOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "District ID"
          },
          "name": {
            "type": "string",
            "description": "District name"
          },
          "country_code": {
            "type": "string",
            "description": "ISO country code"
          },
          "province_code": {
            "type": "string",
            "description": "Province code"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "TablesGeographicalDistrictOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Geographical\\Districts\\DTOs\\TablesGeographicalDistrictOutputDTO"
      },
      "CountyOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "County ID"
          },
          "name": {
            "type": "string",
            "description": "County name"
          },
          "district_id": {
            "type": "integer",
            "description": "Parent district ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "CountyOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Geographical\\Counties\\DTOs\\CountyOutputDTO"
      },
      "ZoneOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Zone code"
          },
          "name": {
            "type": "string",
            "description": "Zone name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Updated timestamp"
          }
        },
        "title": "ZoneOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Geographical\\Zones\\DTOs\\ZoneOutputDTO"
      },
      "ClassificationOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Classification identifier"
          },
          "description": {
            "type": "string",
            "description": "Classification name"
          }
        },
        "title": "ClassificationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Crm\\Classifications\\DTOs\\ClassificationOutputDTO"
      },
      "TablesWorkshopServiceOrderClassificationOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Classification id"
          },
          "name": {
            "type": "string",
            "description": "Classification name"
          },
          "is_active": {
            "type": "boolean",
            "description": "Active flag"
          },
          "valorization": {
            "type": "string",
            "description": "Valorization code (PV/PCM/...)"
          },
          "recalculate_assoc": {
            "type": "boolean",
            "description": "Recalculate associated lines"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "TablesWorkshopServiceOrderClassificationOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\Workshop\\ServiceOrderClassifications\\DTO\\TablesWorkshopServiceOrderClassificationOutputDTO"
      },
      "TimeIntervalOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Interval identifier, the value a stored filter keeps to name a window without pinning it to dates"
          },
          "designation": {
            "type": "string",
            "nullable": true,
            "description": "Interval name resolved for the language of the request: the column holds a dictionary key and falls back to whatever the tenant typed there"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "First day of the window as of now, resolved server side. Null when the row leaves the bound open"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Last day of the window as of now, resolved server side. Null when the row leaves the bound open"
          },
          "start_expression": {
            "type": "string",
            "nullable": true,
            "description": "The strtotime expression behind start_date. A stored filter written before intervals carried an id keeps this pair instead, so it is what identifies the window there. The pair is not unique across rows: today and today name six windows that differ only by their date format, and the legacy screens resolve that collision by taking the lowest id"
          },
          "end_expression": {
            "type": "string",
            "nullable": true,
            "description": "The strtotime expression behind end_date, the other half of the pair a stored filter keeps"
          }
        },
        "title": "TimeIntervalOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tables\\TimeIntervals\\DTOs\\TimeIntervalOutputDTO"
      },
      "TicketPageOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "user_type": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "integer",
            "nullable": true
          },
          "dept_id": {
            "type": "integer",
            "nullable": true
          },
          "status_id": {
            "type": "integer",
            "nullable": true
          },
          "priority_id": {
            "type": "integer",
            "nullable": true
          },
          "assignee_id": {
            "type": "integer",
            "nullable": true
          },
          "subscription_id": {
            "type": "integer",
            "nullable": true
          },
          "document_type": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "integer",
            "nullable": true
          },
          "is_trash": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "last_reply_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "closed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "posts": {
            "type": "array"
          },
          "tasks": {
            "type": "array"
          }
        },
        "title": "TicketPageOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\TicketPageOutputDTO"
      },
      "TicketTimelineOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "dept_id": {
            "type": "integer",
            "nullable": true
          },
          "status_id": {
            "type": "integer",
            "nullable": true
          },
          "priority_id": {
            "type": "integer",
            "nullable": true
          },
          "assignee_id": {
            "type": "integer",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timeline": {
            "type": "array"
          }
        },
        "title": "TicketTimelineOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\TicketTimelineOutputDTO"
      },
      "CompanyInfoDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          },
          "webpage": {
            "type": "string"
          },
          "lat": {
            "type": "string"
          },
          "lng": {
            "type": "string"
          }
        },
        "title": "CompanyInfoDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\CompanyInfoDTO"
      },
      "CompanyImageDTO": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "base64": {
            "type": "string"
          }
        },
        "title": "CompanyImageDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\CompanyImageDTO"
      },
      "CompanyPosDTO": {
        "type": "object",
        "properties": {
          "footer_pos": {
            "type": "string"
          },
          "qr_code_pos": {
            "type": "string"
          },
          "show_tasks": {
            "type": "string"
          },
          "update_gps_by_doc": {
            "type": "string"
          }
        },
        "title": "CompanyPosDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\CompanyPosDTO"
      },
      "LicenseDTO": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Installation license key."
          },
          "valid": {
            "type": "boolean",
            "description": "Whether the license is valid."
          },
          "active": {
            "type": "boolean",
            "description": "Whether the license is active."
          },
          "status": {
            "type": "string",
            "description": "Status returned by the licensing service."
          },
          "description": {
            "type": "string",
            "description": "Licensing service status description, when present."
          },
          "client_name": {
            "type": "string",
            "description": "Licensed customer name."
          },
          "client_vat": {
            "type": "string",
            "description": "Licensed customer tax identifier."
          },
          "partner_name": {
            "type": "string",
            "description": "Licensing partner name."
          },
          "product_name": {
            "type": "string",
            "description": "Licensed product name."
          },
          "date_reg": {
            "type": "string",
            "nullable": true,
            "description": "Registration date in the original licensing format."
          },
          "date_reissue": {
            "type": "string",
            "nullable": true,
            "description": "Reissue date in the original licensing format."
          },
          "date_due": {
            "type": "string",
            "nullable": true,
            "description": "Expiry date; may contain the legacy sentinel 0000-00-00."
          },
          "date_contrat": {
            "type": "string",
            "nullable": true,
            "description": "Contract date in the original licensing format."
          },
          "billingcycle": {
            "type": "string",
            "description": "Billing cycle reported by the licensing service."
          },
          "nextduedate": {
            "type": "string",
            "nullable": true,
            "description": "Next due date in the original licensing format."
          },
          "checkdate": {
            "type": "string",
            "description": "Last license check date in YYYYMMDD format."
          },
          "ogfields": {
            "description": "Existing OfficeGest hosting and storage metadata; an empty map is serialized as an empty array.",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Tenant domain."
                  },
                  "server_web_name": {
                    "type": "string",
                    "description": "Web server name."
                  },
                  "server_db_name": {
                    "type": "string",
                    "description": "Database server name."
                  },
                  "database_name": {
                    "type": "string",
                    "description": "Tenant database name."
                  },
                  "web_release": {
                    "type": "string",
                    "description": "Application release."
                  },
                  "size_db": {
                    "type": "number",
                    "description": "Database size reported by the licensing service."
                  },
                  "size_db_date": {
                    "type": "string",
                    "description": "Database size measurement date."
                  },
                  "size_attach": {
                    "type": "number",
                    "description": "Attachment size reported by the licensing service."
                  },
                  "size_attach_date": {
                    "type": "string",
                    "description": "Attachment size measurement date."
                  }
                }
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "configoptions": {
            "description": "Licensed option names mapped to flags or quantities in their original types; an empty map is serialized as an empty array.",
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                }
              },
              {
                "type": "array",
                "maxItems": 0,
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "max_users": {
            "type": "integer",
            "description": "Maximum licensed simultaneous users, including the base user."
          },
          "active_users": {
            "type": "integer",
            "description": "Number of employees with web access enabled."
          },
          "datacenter_offer_gb": {
            "description": "Contracted datacenter storage in GB, preserving the licensing value type; null when unspecified.",
            "oneOf": [
              {
                "type": "string",
                "nullable": true
              },
              {
                "type": "number"
              }
            ]
          },
          "rate_limit_per_minute": {
            "type": "integer",
            "description": "Configured API request limit per client IP for the throttle window (60 seconds by default), including the tenant Redis override; not remaining requests."
          },
          "rate_limit_per_month": {
            "type": "integer",
            "example": 100000,
            "description": "Configured monthly API request limit for the tenant, including the Redis override; not the remaining balance."
          }
        },
        "title": "LicenseDTO",
        "required": [
          "max_users",
          "active_users",
          "datacenter_offer_gb",
          "rate_limit_per_minute",
          "rate_limit_per_month"
        ],
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\LicenseDTO"
      },
      "ParametersDTO": {
        "type": "object",
        "properties": {
          "fs_conversionamountfa": {
            "type": "string"
          },
          "fs_conversionamountfacf": {
            "type": "string"
          },
          "cashnumberbase": {
            "type": "string"
          },
          "defaultbankcode": {
            "type": "string"
          },
          "defaultcashbankcode": {
            "type": "string"
          },
          "defaultcurrencycode": {
            "type": "string"
          },
          "countrydefaultcode": {
            "type": "string"
          },
          "salefinalclient": {
            "type": "string"
          },
          "defaultstore": {
            "type": "string"
          },
          "documenttype_order": {
            "type": "string"
          },
          "documenttype_budget": {
            "type": "string"
          },
          "documenttype_creditnote": {
            "type": "string"
          },
          "gdpr_regulation_type": {
            "type": "string"
          },
          "appmobile_workshop_status": {
            "type": "string"
          },
          "gdpr_regulation_html": {
            "type": "string"
          }
        },
        "title": "ParametersDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\ParametersDTO"
      },
      "DecisionVariableDTO": {
        "type": "object",
        "title": "DecisionVariableDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\DecisionVariableDTO"
      },
      "DecisionVariablesBulkDTO": {
        "type": "object",
        "properties": {
          "decision_variables": {
            "type": "array"
          },
          "names": {
            "type": "object"
          }
        },
        "title": "DecisionVariablesBulkDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\DecisionVariablesBulkDTO"
      },
      "HomeNewsOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "short_description": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "link": {
            "type": "string",
            "nullable": true
          },
          "embed_link": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "HomeNewsOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\HomeNewsOutputDTO"
      },
      "ActiveSessionOutputDTO": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "avatar_url": {
            "type": "string"
          },
          "panel": {
            "type": "string",
            "nullable": true
          },
          "chat_active": {
            "type": "boolean"
          },
          "session_id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_action_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "ActiveSessionOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\ActiveSessionOutputDTO"
      },
      "ActiveSessionsOutputDTO": {
        "type": "object",
        "properties": {
          "online_users": {
            "type": "integer"
          },
          "busy_slots": {
            "type": "integer"
          },
          "max_users": {
            "type": "integer"
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActiveSessionOutputDTO"
            }
          }
        },
        "title": "ActiveSessionsOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\ActiveSessionsOutputDTO"
      },
      "DashboardLayoutOutputDTO": {
        "type": "object",
        "properties": {
          "employee": {
            "type": "integer",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "user",
              "default"
            ]
          },
          "main": {
            "type": "array"
          },
          "rail": {
            "type": "array"
          },
          "settings": {
            "type": "object"
          }
        },
        "title": "DashboardLayoutOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\DashboardLayoutOutputDTO"
      },
      "DashboardWidgetOutputDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "module": {
            "type": "string",
            "nullable": true
          }
        },
        "title": "DashboardWidgetOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Utils\\DTOs\\DashboardWidgetOutputDTO"
      },
      "ChecklistProcessOutputDTO": {
        "type": "object",
        "properties": {
          "process_id": {
            "type": "integer",
            "description": "Process identifier"
          },
          "checklist_id": {
            "type": "integer",
            "description": "Checklist item identifier"
          },
          "value": {
            "type": "integer",
            "description": "Current conformity value",
            "nullable": true
          },
          "checklist": {
            "type": "object",
            "description": "Checklist item details"
          },
          "checklist_value": {
            "type": "object",
            "description": "Conformity value details"
          }
        },
        "title": "ChecklistProcessOutputDTO",
        "x-og-fqcn": "Og\\Modules\\EcoAuto\\DTOs\\ChecklistProcessOutputDTO"
      },
      "TicketAddressOutputDTO": {
        "type": "object",
        "properties": {
          "ticket_id": {
            "type": "integer"
          },
          "type": {
            "type": "string",
            "enum": [
              "to",
              "cc",
              "bcc"
            ]
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "title": "TicketAddressOutputDTO",
        "x-og-fqcn": "Og\\Modules\\Tickets\\DTOs\\TicketAddressOutputDTO"
      }
    },
    "headers": {
      "X-Trace-Id": {
        "description": "Request identifier, sent on every response. Equals meta.trace_id in error bodies.",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying. Sent on every 429, by both the per-minute and the monthly limit.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Limit": {
        "description": "Requests allowed per minute for this client IP (contracted license limit, 200 by default). On a 429, sent only when the per-minute limit refused the request.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the current minute window. 0 on a per-minute 429.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Unix timestamp (seconds) when the per-minute window resets. Sent only on a per-minute 429.",
        "schema": {
          "type": "integer"
        }
      }
    }
  },
  "paths": {
    "/stocks/label-templates": {
      "get": {
        "summary": "List label templates",
        "description": "Returns all label templates formatted for DataTable consumption.",
        "tags": [
          "Stocks",
          "LabelTemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\LabelTemplates\\Policies\\LabelTemplatePolicy"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LabelTemplate"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create label template",
        "description": "Creates a new JSON-based label template.",
        "tags": [
          "Stocks",
          "LabelTemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\LabelTemplates\\Policies\\LabelTemplatePolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Template name"
                  },
                  "width": {
                    "type": "number",
                    "description": "Label width in mm"
                  },
                  "height": {
                    "type": "number",
                    "description": "Label height in mm"
                  },
                  "json_layout": {
                    "type": "string",
                    "description": "JSON layout definition"
                  },
                  "margin_left": {
                    "type": "number",
                    "description": "Left margin in mm"
                  },
                  "margin_top": {
                    "type": "number",
                    "description": "Top margin in mm"
                  },
                  "barcode_type": {
                    "type": "string",
                    "description": "Barcode format (EAN-13, CODE128)"
                  },
                  "orientation": {
                    "type": "string",
                    "description": "Page orientation (P or L)"
                  },
                  "sort_order": {
                    "type": "integer",
                    "description": "Sort order"
                  }
                },
                "required": [
                  "name",
                  "width",
                  "height",
                  "json_layout"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LabelTemplate"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/label-templates/{labelTemplate}": {
      "get": {
        "summary": "Get label template",
        "description": "Returns a single label template by ID.",
        "tags": [
          "Stocks",
          "LabelTemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\LabelTemplates\\Policies\\LabelTemplatePolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "labelTemplate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LabelTemplate"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update label template",
        "description": "Updates an existing label template by ID.",
        "tags": [
          "Stocks",
          "LabelTemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\LabelTemplates\\Policies\\LabelTemplatePolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "labelTemplate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Template name"
                  },
                  "width": {
                    "type": "number",
                    "description": "Label width in mm"
                  },
                  "height": {
                    "type": "number",
                    "description": "Label height in mm"
                  },
                  "json_layout": {
                    "type": "string",
                    "description": "JSON layout definition"
                  },
                  "margin_left": {
                    "type": "number",
                    "description": "Left margin in mm"
                  },
                  "margin_top": {
                    "type": "number",
                    "description": "Top margin in mm"
                  },
                  "barcode_type": {
                    "type": "string",
                    "description": "Barcode format (EAN-13, CODE128)"
                  },
                  "orientation": {
                    "type": "string",
                    "description": "Page orientation (P or L)"
                  },
                  "sort_order": {
                    "type": "integer",
                    "description": "Sort order"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LabelTemplate"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete label template",
        "description": "Deletes a label template by ID.",
        "tags": [
          "Stocks",
          "LabelTemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\LabelTemplates\\Policies\\LabelTemplatePolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "labelTemplate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Label template deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/families/{family}/subfamilies/{subfamily}/subsubfamilies": {
      "get": {
        "summary": "List sub-subfamilies",
        "description": "Returns a paginated list of sub-subfamilies under a subfamily.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by name",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Search in name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like, sw, ew. Example: filter[name][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gt, gte, lt, lte. Example: filter[created_at][gt]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gt, gte, lt, lte. Example: filter[updated_at][gt]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubSubFamilyOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create sub-subfamily",
        "description": "Creates a new sub-subfamily under a subfamily.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3,
                    "description": "Sub-subfamily code (1-3 characters)"
                  },
                  "name": {
                    "type": "string",
                    "description": "Sub-subfamily name"
                  },
                  "tpv_active": {
                    "type": "string",
                    "description": "Active in TPV (T/F)"
                  },
                  "commission_percentage": {
                    "type": "number",
                    "description": "Minimum profit margin"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubSubFamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/families/{family}/subfamilies/{subfamily}/subsubfamilies/{subsubfamily}": {
      "get": {
        "summary": "Get sub-subfamily",
        "description": "Returns a single sub-subfamily.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subsubfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubSubFamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update sub-subfamily",
        "description": "Updates an existing sub-subfamily.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subsubfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Sub-subfamily name"
                  },
                  "tpv_active": {
                    "type": "string",
                    "description": "Active in TPV (T/F)"
                  },
                  "commission_percentage": {
                    "type": "number",
                    "description": "Commission percentage"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubSubFamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/families/{family}/subfamilies": {
      "get": {
        "summary": "List subfamilies",
        "description": "Returns a paginated list of subfamilies under a family.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by name",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Search in name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like, sw, ew. Example: filter[name][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gt, gte, lt, lte. Example: filter[created_at][gt]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gt, gte, lt, lte. Example: filter[updated_at][gt]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubFamilyOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create subfamily",
        "description": "Creates a new subfamily under a family.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3,
                    "description": "Subfamily code (1-3 characters)"
                  },
                  "name": {
                    "type": "string",
                    "description": "Subfamily name"
                  },
                  "tpv_active": {
                    "type": "string",
                    "description": "Active in TPV (T/F)"
                  },
                  "commission_percentage": {
                    "type": "number",
                    "description": "Commission percentage"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubFamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/families/{family}/subfamilies/{subfamily}": {
      "get": {
        "summary": "Get subfamily",
        "description": "Returns a single subfamily.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubFamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update subfamily",
        "description": "Updates an existing subfamily.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfamily",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Subfamily name"
                  },
                  "tpv_active": {
                    "type": "string",
                    "description": "Active in TPV (T/F)"
                  },
                  "commission_percentage": {
                    "type": "number",
                    "description": "Commission percentage"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubFamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/suppliers": {
      "get": {
        "summary": "List suppliers",
        "description": "Returns a paginated list of suppliers with optional filtering.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades:fornecedores"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3,
              "minLength": 2
            },
            "deprecated": true
          },
          {
            "name": "tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "mobile_phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "fax",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "webpage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            },
            "deprecated": true
          },
          {
            "name": "classification_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 6
            },
            "deprecated": true
          },
          {
            "name": "notes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "is_service_provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "operator",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[phone2][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[mobile_phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[mobile_phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[fax][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[fax][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[email][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[email][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[webpage][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[webpage][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[entity_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[entity_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[classification_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[classification_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[notes][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[notes][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_service_provider][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[is_service_provider][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EntitiesSupplierOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create supplier",
        "description": "Creates a new supplier.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy",
          "ability": "create",
          "privileges": [
            "entidades:fornecedores:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Supplier full name or company name.",
                    "example": "Fornecedor Industrial Lda"
                  },
                  "tax_id": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Tax identification number (NIF).",
                    "example": "999999990"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Primary address.",
                    "example": "Av. da Indústria, 456"
                  },
                  "address2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 4,
                    "description": "Postal/ZIP code.",
                    "example": "0000-000"
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "City name.",
                    "example": "Porto"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email",
                    "maxLength": 254,
                    "description": "Email address.",
                    "example": "email@fornecedor.pt"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Landline phone number.",
                    "example": "225789456"
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Secondary phone number.",
                    "example": "225789457"
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Fax number.",
                    "example": "225789458"
                  },
                  "webpage": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254,
                    "description": "Website URL.",
                    "example": "https://fornecedor.pt"
                  },
                  "classification_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6,
                    "description": "Supplier classification code.",
                    "example": "1"
                  },
                  "is_service_provider": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Whether the supplier provides services.",
                    "example": false
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "Free-text observations.",
                    "example": "Supplier note."
                  }
                },
                "required": [
                  "name",
                  "tax_id",
                  "address",
                  "postal_code",
                  "city",
                  "country_code"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesSupplierOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/suppliers/{supplier}/addresses": {
      "get": {
        "summary": "List Suppliers addresses",
        "description": "Returns all addresses for a specific Suppliers. Supports filtering, sorting and pagination.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by address description",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "Filter by city",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "description": "Filter by postal code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "description": "Filter by country code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "description": "Filter by phone number",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tax_id",
            "in": "query",
            "required": false,
            "description": "Filter by tax ID",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "query",
            "required": false,
            "description": "Filter by contact",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix with - for DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, sw. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[contact][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[contact][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: greater_than_equal_to, less_than_equal_to. Example: filter[created_at][greater_than_equal_to]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: greater_than_equal_to, less_than_equal_to. Example: filter[updated_at][greater_than_equal_to]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters: filter[field][operator]=value",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SupplierAddressOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Suppliers address",
        "description": "Creates a new address for a specific Suppliers.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "city": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 30
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 2,
                    "maxLength": 3,
                    "description": "Valid value from paises.codpais."
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "contact": {
                    "type": "integer",
                    "nullable": true
                  }
                },
                "required": [
                  "description",
                  "address",
                  "city",
                  "postal_code"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupplierAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/suppliers/validate-login": {
      "post": {
        "summary": "Validate supplier web login",
        "description": "Validates supplier web login credentials. Returns the supplier ID on success.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 45
                  }
                },
                "required": [
                  "login",
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidateLoginOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/suppliers/{supplier}": {
      "get": {
        "summary": "Get supplier",
        "description": "Returns a single supplier by ID.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy",
          "ability": "view",
          "privileges": [
            "entidades:fornecedores:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesSupplierOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update supplier",
        "description": "Updates an existing supplier by ID. All fields are optional.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy",
          "ability": "update",
          "privileges": [
            "entidades:fornecedores:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "tax_id": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "address2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 4
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 2
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email",
                    "maxLength": 254
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "webpage": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "classification_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6,
                    "description": "Valid value from classif_forn.codclassif."
                  },
                  "is_service_provider": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesSupplierOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete supplier",
        "description": "Deletes a supplier by ID.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy",
          "ability": "delete",
          "privileges": [
            "entidades:fornecedores:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Supplier deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/suppliers/{supplier}/contacts": {
      "get": {
        "summary": "Get supplier contacts",
        "description": "Returns a paginated list of contacts for a supplier.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy",
          "ability": "view",
          "privileges": [
            "entidades:fornecedores:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SupplierContactOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/suppliers/{supplier}/addresses/{address}": {
      "get": {
        "summary": "Show Suppliers address",
        "description": "Returns a single address for a specific Suppliers.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupplierAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Suppliers address",
        "description": "Updates fields of a specific Suppliers address. All fields are optional.",
        "tags": [
          "Entities",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "city": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 2,
                    "maxLength": 3,
                    "description": "Valid value from paises.codpais."
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "contact": {
                    "type": "integer",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupplierAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/brands": {
      "get": {
        "summary": "List brands",
        "description": "Returns a paginated list of brands with optional filtering.",
        "tags": [
          "Stocks",
          "Brands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Brands\\Policies\\BrandPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_exclusive",
            "in": "query",
            "required": false,
            "description": "Filter by exclusive brand flag",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by brand name (supports operators: sw, ew, ct, eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by observations/description",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_profit_margin",
            "in": "query",
            "required": false,
            "description": "Filter by minimum profit margin (supports operators: gt, gte, lt, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like, sw, ew. Example: filter[name][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like, sw, ew. Example: filter[description][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[min_profit_margin][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gt, gte, lt, lte. Example: filter[min_profit_margin][gt]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort order (ASC or DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Brand"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create brand",
        "description": "Creates a new brand.",
        "tags": [
          "Stocks",
          "Brands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Brands\\Policies\\BrandPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Brand name"
                  },
                  "observations": {
                    "type": "string",
                    "description": "Brand observations/notes"
                  },
                  "is_exclusive": {
                    "type": "boolean",
                    "description": "Whether brand is exclusive"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin percentage (0-100)"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Brand"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/families": {
      "get": {
        "summary": "List families",
        "description": "Returns a paginated list of root families.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by name (supports: sw, ew, like)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date (supports: gt, gte, lt, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date (supports: gt, gte, lt, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Search in name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like, sw, ew. Example: filter[name][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gt, gte, lt, lte. Example: filter[created_at][gt]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gt, gte, lt, lte. Example: filter[updated_at][gt]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field (id, name, created_at, updated_at)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FamilyOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create family",
        "description": "Creates a new root family.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3,
                    "description": "Family code (1-3 characters)"
                  },
                  "name": {
                    "type": "string",
                    "description": "Family name"
                  },
                  "tpv_active": {
                    "type": "string",
                    "description": "Active in TPV (T/F)"
                  },
                  "commission_percentage": {
                    "type": "number",
                    "description": "Commission percentage"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/measurement-units": {
      "get": {
        "summary": "List measurement units",
        "description": "Returns a paginated list of measurement units with optional filtering.",
        "tags": [
          "Stocks",
          "Measurement Units"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\MeasurementUnits\\Policies\\MeasurementUnitPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by measurement unit code (supports operators: sw, ew, ct, eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by measurement unit name (supports operators: sw, ew, ct, eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like, sw, ew. Example: filter[id][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like, sw, ew. Example: filter[name][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort order (ASC or DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MeasurementUnit"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create measurement unit",
        "description": "Creates a new measurement unit.",
        "tags": [
          "Stocks",
          "Measurement Units"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\MeasurementUnits\\Policies\\MeasurementUnitPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Measurement unit code (e.g., UN, KG, LT, M)"
                  },
                  "name": {
                    "type": "string",
                    "description": "Measurement unit name"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MeasurementUnit"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/brands/{brand}": {
      "get": {
        "summary": "Get brand",
        "description": "Returns a single brand by ID.",
        "tags": [
          "Stocks",
          "Brands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Brands\\Policies\\BrandPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "brand",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Brand"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update brand",
        "description": "Updates an existing brand by ID.",
        "tags": [
          "Stocks",
          "Brands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Brands\\Policies\\BrandPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "brand",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Brand name"
                  },
                  "observations": {
                    "type": "string",
                    "description": "Brand observations/notes"
                  },
                  "is_exclusive": {
                    "type": "boolean",
                    "description": "Whether brand is exclusive"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin percentage (0-100)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Brand"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete brand",
        "description": "Deletes a brand by ID.",
        "tags": [
          "Stocks",
          "Brands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Brands\\Policies\\BrandPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "brand",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Brand deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/families/{family}": {
      "get": {
        "summary": "Get family",
        "description": "Returns a single family by codfam.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update family",
        "description": "Updates an existing family name.",
        "tags": [
          "Stocks",
          "Families"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Families\\Policies\\FamilyPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Family name"
                  },
                  "tpv_active": {
                    "type": "string",
                    "description": "Active in TPV (T/F)"
                  },
                  "commission_percentage": {
                    "type": "number",
                    "description": "Commission percentage"
                  },
                  "min_profit_margin": {
                    "type": "number",
                    "description": "Minimum profit margin"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FamilyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/measurement-units/{measurementUnit}": {
      "get": {
        "summary": "Get measurement unit",
        "description": "Returns a single measurement unit by ID.",
        "tags": [
          "Stocks",
          "Measurement Units"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\MeasurementUnits\\Policies\\MeasurementUnitPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "measurementUnit",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MeasurementUnit"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update measurement unit",
        "description": "Updates an existing measurement unit by ID.",
        "tags": [
          "Stocks",
          "Measurement Units"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\MeasurementUnits\\Policies\\MeasurementUnitPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "measurementUnit",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Measurement unit name"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MeasurementUnit"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete measurement unit",
        "description": "Deletes a measurement unit by ID.",
        "tags": [
          "Stocks",
          "Measurement Units"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\MeasurementUnits\\Policies\\MeasurementUnitPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "measurementUnit",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Measurement unit deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/list": {
      "post": {
        "summary": "List tickets",
        "description": "Returns a paginated list of tickets with optional filtering.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "viewAny",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order": {
                    "type": "string"
                  },
                  "sorder": {
                    "type": "string",
                    "enum": [
                      "ASC",
                      "DESC"
                    ]
                  },
                  "sort": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "integer",
                    "nullable": true
                  },
                  "user_id": {
                    "type": "number"
                  },
                  "user_type": {
                    "type": "string"
                  },
                  "dept_id": {
                    "type": "number"
                  },
                  "assignee_id": {
                    "type": "number"
                  },
                  "subscription_id": {
                    "type": "number"
                  },
                  "status_type": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "resolved",
                      "hold",
                      "closed"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date"
                  },
                  "sla_first_reply_due_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "sla_resolution_due_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "sla_next_update_due_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ids": {
                    "type": "string"
                  },
                  "filter": {
                    "type": "object",
                    "properties": {
                      "ids": {
                        "type": "array"
                      },
                      "user_id": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), neq: Not equal to (!=), gt: Greater than (>), gte: Greater or equal (>=), lt: Less than (<), lte: Less or equal (<=), like: Contains (%value%), ct: Contains (alias of like), nlike: Not contains, sw: Starts with (value%), ew: Ends with (%value), in: In list (comma separated), nin: Not in list.",
                        "x-og-operators": [
                          "eq",
                          "neq",
                          "gt",
                          "gte",
                          "lt",
                          "lte",
                          "like",
                          "ct",
                          "nlike",
                          "sw",
                          "ew",
                          "in",
                          "nin"
                        ]
                      },
                      "user_type": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), neq: Not equal to (!=), gt: Greater than (>), gte: Greater or equal (>=), lt: Less than (<), lte: Less or equal (<=), like: Contains (%value%), ct: Contains (alias of like), nlike: Not contains, sw: Starts with (value%), ew: Ends with (%value), in: In list (comma separated), nin: Not in list.",
                        "x-og-operators": [
                          "eq",
                          "neq",
                          "gt",
                          "gte",
                          "lt",
                          "lte",
                          "like",
                          "ct",
                          "nlike",
                          "sw",
                          "ew",
                          "in",
                          "nin"
                        ]
                      },
                      "dept_id": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), neq: Not equal to (!=), gt: Greater than (>), gte: Greater or equal (>=), lt: Less than (<), lte: Less or equal (<=), like: Contains (%value%), ct: Contains (alias of like), nlike: Not contains, sw: Starts with (value%), ew: Ends with (%value), in: In list (comma separated), nin: Not in list.",
                        "x-og-operators": [
                          "eq",
                          "neq",
                          "gt",
                          "gte",
                          "lt",
                          "lte",
                          "like",
                          "ct",
                          "nlike",
                          "sw",
                          "ew",
                          "in",
                          "nin"
                        ]
                      },
                      "assignee_id": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), neq: Not equal to (!=), gt: Greater than (>), gte: Greater or equal (>=), lt: Less than (<), lte: Less or equal (<=), like: Contains (%value%), ct: Contains (alias of like), nlike: Not contains, sw: Starts with (value%), ew: Ends with (%value), in: In list (comma separated), nin: Not in list.",
                        "x-og-operators": [
                          "eq",
                          "neq",
                          "gt",
                          "gte",
                          "lt",
                          "lte",
                          "like",
                          "ct",
                          "nlike",
                          "sw",
                          "ew",
                          "in",
                          "nin"
                        ]
                      },
                      "subscription_id": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), neq: Not equal to (!=), gt: Greater than (>), gte: Greater or equal (>=), lt: Less than (<), lte: Less or equal (<=), like: Contains (%value%), ct: Contains (alias of like), nlike: Not contains, sw: Starts with (value%), ew: Ends with (%value), in: In list (comma separated), nin: Not in list.",
                        "x-og-operators": [
                          "eq",
                          "neq",
                          "gt",
                          "gte",
                          "lt",
                          "lte",
                          "like",
                          "ct",
                          "nlike",
                          "sw",
                          "ew",
                          "in",
                          "nin"
                        ]
                      },
                      "status_type": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=).",
                        "x-og-operators": [
                          "eq"
                        ]
                      },
                      "created_at": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), neq: Not equal to (!=), gt: Greater than (>), gte: Greater or equal (>=), lt: Less than (<), lte: Less or equal (<=), like: Contains (%value%), ct: Contains (alias of like), nlike: Not contains, sw: Starts with (value%), ew: Ends with (%value), in: In list (comma separated), nin: Not in list.",
                        "x-og-operators": [
                          "eq",
                          "neq",
                          "gt",
                          "gte",
                          "lt",
                          "lte",
                          "like",
                          "ct",
                          "nlike",
                          "sw",
                          "ew",
                          "in",
                          "nin"
                        ]
                      },
                      "sla_first_reply_due_at": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), gte: Greater or equal (>=), lte: Less or equal (<=).",
                        "x-og-operators": [
                          "eq",
                          "gte",
                          "lte"
                        ]
                      },
                      "sla_resolution_due_at": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), gte: Greater or equal (>=), lte: Less or equal (<=).",
                        "x-og-operators": [
                          "eq",
                          "gte",
                          "lte"
                        ]
                      },
                      "sla_next_update_due_at": {
                        "type": "string",
                        "description": " Allowed operators: eq: Equal to (=), gte: Greater or equal (>=), lte: Less or equal (<=).",
                        "x-og-operators": [
                          "eq",
                          "gte",
                          "lte"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketHeaderOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets": {
      "get": {
        "summary": "List tickets",
        "description": "Returns a paginated list of tickets with optional filtering.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "viewAny",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field, prefixed with - for descending. Includes sla_first_reply_due_at, sla_resolution_due_at and sla_next_update_due_at; tickets without that deadline come first in ascending order.",
            "example": "sla_resolution_due_at",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "description": "Filter by entity ID.",
            "example": 123,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "user_type",
            "in": "query",
            "required": false,
            "description": "Filter by entity type (C=customer, R=salesman, etc).",
            "example": "C",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dept_id",
            "in": "query",
            "required": false,
            "description": "Filter by department ID.",
            "example": 1,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "assignee_id",
            "in": "query",
            "required": false,
            "description": "Filter by assigned employee ID.",
            "example": 5,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "subscription_id",
            "in": "query",
            "required": false,
            "description": "Filter by subscription ID.",
            "example": 10,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status_type",
            "in": "query",
            "required": false,
            "description": "Filter by status type.",
            "example": "normal",
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "normal",
                "resolved",
                "hold",
                "closed"
              ]
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date (Y-m-d).",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "sla_first_reply_due_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "deprecated": true
          },
          {
            "name": "sla_resolution_due_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "deprecated": true
          },
          {
            "name": "sla_next_update_due_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "deprecated": true
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Filter by a comma-separated list of ticket IDs.",
            "example": "1,2,3",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[user_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[user_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[user_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[user_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[dept_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[dept_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[assignee_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[assignee_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[subscription_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[subscription_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[status_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[status_type][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "normal",
                "resolved",
                "hold",
                "closed"
              ]
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[sla_first_reply_due_at][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by first reply (TPR) deadline (Y-m-d H:i:s), with operators eq, gte, lte (filter[sla_first_reply_due_at][lte]=...). Operators: eq, gte, lte. Example: filter[sla_first_reply_due_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[sla_resolution_due_at][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by resolution (TTR) deadline (Y-m-d H:i:s), with operators eq, gte, lte (filter[sla_resolution_due_at][lte]=...). Operators: eq, gte, lte. Example: filter[sla_resolution_due_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[sla_next_update_due_at][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by status-update round (TER) deadline (Y-m-d H:i:s), with operators eq, gte, lte (filter[sla_next_update_due_at][lte]=...). Operators: eq, gte, lte. Example: filter[sla_next_update_due_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketHeaderOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create ticket",
        "description": "Creates a new ticket with initial reply and addresses.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "create",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dept_id": {
                    "type": "number",
                    "description": "Department ID.",
                    "example": 1
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Ticket subject.",
                    "example": "Problem with order"
                  },
                  "body": {
                    "type": "string",
                    "description": "Initial message body.",
                    "example": "I need help with..."
                  },
                  "user_type": {
                    "type": "string",
                    "maxLength": 1,
                    "description": "Entity type (C=customer, R=salesman).",
                    "example": "C"
                  },
                  "user_id": {
                    "type": "number",
                    "description": "Entity ID.",
                    "example": 100
                  },
                  "priority_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "status_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "topic_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "assignee_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "subscription_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "campaign_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255
                  },
                  "business_opportunity_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "send_email": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Whether to send the initial email. Default: true.",
                    "example": true
                  },
                  "addresses": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true,
                          "maxLength": 255
                        },
                        "type": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "to",
                            "cc",
                            "bcc"
                          ]
                        }
                      },
                      "required": [
                        "email"
                      ]
                    },
                    "description": "Array of email addresses for this ticket."
                  }
                },
                "required": [
                  "dept_id",
                  "subject",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateTicketOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/sync": {
      "post": {
        "summary": "Sync tickets from email",
        "description": "Fetches and processes new tickets from configured email accounts.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "create",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Empty payload on success.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/sync/{accountId}": {
      "post": {
        "summary": "Sync tickets from a specific email account",
        "description": "Fetches and processes new tickets from a specific email account.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "create",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Empty payload on success.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}/replies": {
      "post": {
        "summary": "Create ticket reply",
        "description": "Adds a reply (post) to a ticket.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "update",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "description": "Reply message body.",
                    "example": "Thank you for contacting us."
                  },
                  "type": {
                    "type": "string",
                    "nullable": true,
                    "enum": [
                      "staff",
                      "user"
                    ],
                    "description": "Reply type: staff or user.",
                    "example": "staff"
                  },
                  "poster": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 127,
                    "description": "Display name of the poster.",
                    "example": "Support Team"
                  },
                  "send_email": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Whether to send the reply by email.",
                    "example": true
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketReplyOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}/notes": {
      "post": {
        "summary": "Create ticket note",
        "description": "Adds an internal note to a ticket.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "update",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "description": "Internal note body.",
                    "example": "Called customer, awaiting response."
                  },
                  "user_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Employee ID authoring the note.",
                    "example": 3
                  },
                  "poster": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 127,
                    "description": "Display name for the note author.",
                    "example": "John Doe"
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketNoteOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}/forward": {
      "post": {
        "summary": "Forward ticket",
        "description": "Forwards a ticket to one or more email addresses.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "update",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "addresses": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    },
                    "description": "Array of email addresses to forward to.",
                    "example": [
                      "manager@example.com"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Forward result payload.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}/public-link": {
      "post": {
        "summary": "Generate public link",
        "description": "Generates a public shareable link for a ticket.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "view",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketPublicLinkOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/bulk-headers": {
      "get": {
        "summary": "Bulk ticket headers",
        "description": "Returns header data for multiple tickets by ID.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "viewAny",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Array of ticket IDs to fetch headers for.",
            "example": [
              1,
              2,
              3
            ],
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketHeaderOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}": {
      "get": {
        "summary": "Get ticket",
        "description": "Returns header data for a specific ticket.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "view",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketHeaderOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update ticket",
        "description": "Updates an existing ticket.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "update",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255,
                    "description": "Ticket subject.",
                    "example": "Updated subject"
                  },
                  "priority_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Priority ID.",
                    "example": 2
                  },
                  "status_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Status ID.",
                    "example": 1
                  },
                  "topic_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "assignee_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Assigned employee ID.",
                    "example": 5
                  },
                  "dept_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "user_type": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1
                  },
                  "user_id": {
                    "type": "number",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketHeaderOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}/page": {
      "get": {
        "summary": "Ticket page",
        "description": "Returns a ticket with all posts and their attachments.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "view",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketPageOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}/timeline": {
      "get": {
        "summary": "Ticket timeline",
        "description": "Returns a chronological timeline of posts and notes for a ticket.",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "view",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketTimelineOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/{ticket}/addresses": {
      "patch": {
        "summary": "Update ticket addresses",
        "description": "Updates email addresses for a ticket (to, cc, bcc).",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tickets\\Policies\\TicketPolicy",
          "ability": "update",
          "privileges": [
            "tickets"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ticket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "addresses": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true,
                          "maxLength": 255
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "to",
                            "cc",
                            "bcc"
                          ]
                        }
                      },
                      "required": [
                        "email",
                        "type"
                      ]
                    },
                    "description": "Array of addresses to add to the ticket."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketAddressOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/parameters": {
      "get": {
        "summary": "Get CRM parameters",
        "description": "Returns the CRM parameters grouped by topic. The agenda topic follows the crm:marcacoes:view:all privilege; the configuration topics require configuracoes:parametros.",
        "tags": [
          "CRM Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "crm:marcacoes:view:all"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic, including the legacy agenda topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update CRM parameters",
        "description": "Updates CRM configuration parameters. Only provided fields are changed.",
        "tags": [
          "CRM Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agenda": {
                    "type": "object",
                    "properties": {
                      "default_view": {
                        "type": "string",
                        "description": "Default calendar view mode"
                      },
                      "show_business_days": {
                        "type": "boolean",
                        "description": "Show only business days in calendar"
                      },
                      "business_days": {
                        "type": "array",
                        "description": "Array of business day numbers (0=Sunday, 6=Saturday)"
                      },
                      "business_hours_start": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Business hours start time (HH:mm)"
                      },
                      "business_hours_end": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Business hours end time (HH:mm)"
                      },
                      "show_time_start": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Calendar visible time start (HH:mm)"
                      },
                      "show_time_end": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Calendar visible time end (HH:mm)"
                      },
                      "hidden_days": {
                        "type": "array",
                        "description": "Array of day numbers to hide from calendar"
                      },
                      "color_mode": {
                        "type": "string",
                        "enum": [
                          "completed",
                          "category",
                          "employee"
                        ],
                        "description": "Calendar color mode"
                      },
                      "allow_appointments_on_holidays": {
                        "type": "boolean"
                      },
                      "allow_appointments_on_vacations": {
                        "type": "boolean"
                      },
                      "allow_appointments_on_absences": {
                        "type": "boolean"
                      },
                      "allow_appointments_outside_business_hours": {
                        "type": "boolean"
                      },
                      "employee_concurrent_appointments": {
                        "type": "number"
                      },
                      "appointment_state_notifications": {
                        "type": "boolean",
                        "description": "Message the responsible on appointment state changes (shared with the workshop)"
                      },
                      "orientation": {
                        "type": "string",
                        "enum": [
                          "horizontal",
                          "vertical"
                        ],
                        "description": "Agenda orientation: horizontal (default) or vertical"
                      },
                      "column_width": {
                        "type": "integer",
                        "minimum": 80,
                        "maximum": 400,
                        "description": "Employee column width in px, vertical orientation (80-400)"
                      },
                      "agenda_order_departments": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "agenda_order_employees": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "employees_visibility": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "employee_id": {
                              "type": "integer",
                              "minimum": 1,
                              "description": "Employee ID"
                            },
                            "visible": {
                              "type": "boolean",
                              "description": "Whether the employee is shown on the agendas"
                            }
                          }
                        },
                        "description": "Bulk agenda visibility changes"
                      }
                    },
                    "description": "Agenda settings object"
                  },
                  "notifications": {
                    "type": "object",
                    "properties": {
                      "notify_customer": {
                        "type": "boolean"
                      },
                      "notify_origin_contact": {
                        "type": "boolean"
                      },
                      "notify_customer_on_phase_change": {
                        "type": "boolean"
                      },
                      "notify_employee": {
                        "type": "boolean"
                      },
                      "notify_seller": {
                        "type": "boolean"
                      }
                    }
                  },
                  "appointments": {
                    "type": "object",
                    "properties": {
                      "default_days_ahead": {
                        "type": "integer"
                      },
                      "notify_by_email_default": {
                        "type": "boolean"
                      },
                      "notify_by_sms_default": {
                        "type": "boolean"
                      }
                    }
                  },
                  "email": {
                    "type": "object",
                    "properties": {
                      "send_limit": {
                        "type": "integer"
                      },
                      "default_to_contact_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "preferential",
                          "financial",
                          "commercial"
                        ]
                      },
                      "default_cc_contact_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "preferential",
                          "financial",
                          "commercial"
                        ]
                      },
                      "default_bcc_contact_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "preferential",
                          "financial",
                          "commercial"
                        ]
                      }
                    }
                  },
                  "opportunities": {
                    "type": "object",
                    "properties": {
                      "document_types": {
                        "type": "array"
                      },
                      "min_value": {
                        "type": "number"
                      }
                    }
                  },
                  "vouchers": {
                    "type": "object",
                    "properties": {
                      "uses_gift_voucher": {
                        "type": "boolean"
                      },
                      "gift_voucher_article": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "general": {
                    "type": "object",
                    "properties": {
                      "uses_internal_chat": {
                        "type": "boolean"
                      },
                      "reference_type_requirement": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "optional",
                          "required"
                        ]
                      }
                    }
                  },
                  "calendar": {
                    "type": "object",
                    "properties": {
                      "uses_legacy_week_view": {
                        "type": "boolean"
                      }
                    }
                  },
                  "agenda.default_view": {
                    "type": "string",
                    "description": "Default calendar view mode"
                  },
                  "agenda.show_business_days": {
                    "type": "boolean",
                    "description": "Show only business days in calendar"
                  },
                  "agenda.business_days": {
                    "type": "array",
                    "description": "Array of business day numbers (0=Sunday, 6=Saturday)"
                  },
                  "agenda.business_hours_start": {
                    "type": "string",
                    "format": "time",
                    "description": "Business hours start time (HH:mm)"
                  },
                  "agenda.business_hours_end": {
                    "type": "string",
                    "format": "time",
                    "description": "Business hours end time (HH:mm)"
                  },
                  "agenda.show_time_start": {
                    "type": "string",
                    "format": "time",
                    "description": "Calendar visible time start (HH:mm)"
                  },
                  "agenda.show_time_end": {
                    "type": "string",
                    "format": "time",
                    "description": "Calendar visible time end (HH:mm)"
                  },
                  "agenda.hidden_days": {
                    "type": "array",
                    "description": "Array of day numbers to hide from calendar"
                  },
                  "agenda.color_mode": {
                    "type": "string",
                    "description": "Calendar color mode"
                  },
                  "agenda.appointment_state_notifications": {
                    "type": "boolean",
                    "description": "Message the responsible on appointment state changes (shared with the workshop)"
                  },
                  "agenda.orientation": {
                    "type": "string",
                    "description": "Agenda orientation: horizontal (default) or vertical"
                  },
                  "agenda.column_width": {
                    "type": "integer",
                    "description": "Employee column width in px, vertical orientation (80-400)"
                  },
                  "agenda.employees_visibility": {
                    "type": "array",
                    "description": "Bulk agenda visibility changes"
                  },
                  "agenda.employees_visibility.*.employee_id": {
                    "type": "integer",
                    "description": "Employee ID"
                  },
                  "agenda.employees_visibility.*.visible": {
                    "type": "boolean",
                    "description": "Whether the employee is shown on the agendas"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update CRM parameters",
        "description": "Updates CRM configuration parameters. Only provided fields are changed.",
        "tags": [
          "CRM Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agenda": {
                    "type": "object",
                    "properties": {
                      "default_view": {
                        "type": "string",
                        "description": "Default calendar view mode"
                      },
                      "show_business_days": {
                        "type": "boolean",
                        "description": "Show only business days in calendar"
                      },
                      "business_days": {
                        "type": "array",
                        "description": "Array of business day numbers (0=Sunday, 6=Saturday)"
                      },
                      "business_hours_start": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Business hours start time (HH:mm)"
                      },
                      "business_hours_end": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Business hours end time (HH:mm)"
                      },
                      "show_time_start": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Calendar visible time start (HH:mm)"
                      },
                      "show_time_end": {
                        "type": "string",
                        "nullable": true,
                        "format": "time",
                        "description": "Calendar visible time end (HH:mm)"
                      },
                      "hidden_days": {
                        "type": "array",
                        "description": "Array of day numbers to hide from calendar"
                      },
                      "color_mode": {
                        "type": "string",
                        "enum": [
                          "completed",
                          "category",
                          "employee"
                        ],
                        "description": "Calendar color mode"
                      },
                      "allow_appointments_on_holidays": {
                        "type": "boolean"
                      },
                      "allow_appointments_on_vacations": {
                        "type": "boolean"
                      },
                      "allow_appointments_on_absences": {
                        "type": "boolean"
                      },
                      "allow_appointments_outside_business_hours": {
                        "type": "boolean"
                      },
                      "employee_concurrent_appointments": {
                        "type": "number"
                      },
                      "appointment_state_notifications": {
                        "type": "boolean",
                        "description": "Message the responsible on appointment state changes (shared with the workshop)"
                      },
                      "orientation": {
                        "type": "string",
                        "enum": [
                          "horizontal",
                          "vertical"
                        ],
                        "description": "Agenda orientation: horizontal (default) or vertical"
                      },
                      "column_width": {
                        "type": "integer",
                        "minimum": 80,
                        "maximum": 400,
                        "description": "Employee column width in px, vertical orientation (80-400)"
                      },
                      "agenda_order_departments": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "agenda_order_employees": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "employees_visibility": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "employee_id": {
                              "type": "integer",
                              "minimum": 1,
                              "description": "Employee ID"
                            },
                            "visible": {
                              "type": "boolean",
                              "description": "Whether the employee is shown on the agendas"
                            }
                          }
                        },
                        "description": "Bulk agenda visibility changes"
                      }
                    },
                    "description": "Agenda settings object"
                  },
                  "notifications": {
                    "type": "object",
                    "properties": {
                      "notify_customer": {
                        "type": "boolean"
                      },
                      "notify_origin_contact": {
                        "type": "boolean"
                      },
                      "notify_customer_on_phase_change": {
                        "type": "boolean"
                      },
                      "notify_employee": {
                        "type": "boolean"
                      },
                      "notify_seller": {
                        "type": "boolean"
                      }
                    }
                  },
                  "appointments": {
                    "type": "object",
                    "properties": {
                      "default_days_ahead": {
                        "type": "integer"
                      },
                      "notify_by_email_default": {
                        "type": "boolean"
                      },
                      "notify_by_sms_default": {
                        "type": "boolean"
                      }
                    }
                  },
                  "email": {
                    "type": "object",
                    "properties": {
                      "send_limit": {
                        "type": "integer"
                      },
                      "default_to_contact_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "preferential",
                          "financial",
                          "commercial"
                        ]
                      },
                      "default_cc_contact_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "preferential",
                          "financial",
                          "commercial"
                        ]
                      },
                      "default_bcc_contact_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "preferential",
                          "financial",
                          "commercial"
                        ]
                      }
                    }
                  },
                  "opportunities": {
                    "type": "object",
                    "properties": {
                      "document_types": {
                        "type": "array"
                      },
                      "min_value": {
                        "type": "number"
                      }
                    }
                  },
                  "vouchers": {
                    "type": "object",
                    "properties": {
                      "uses_gift_voucher": {
                        "type": "boolean"
                      },
                      "gift_voucher_article": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "general": {
                    "type": "object",
                    "properties": {
                      "uses_internal_chat": {
                        "type": "boolean"
                      },
                      "reference_type_requirement": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "optional",
                          "required"
                        ]
                      }
                    }
                  },
                  "calendar": {
                    "type": "object",
                    "properties": {
                      "uses_legacy_week_view": {
                        "type": "boolean"
                      }
                    }
                  },
                  "agenda.default_view": {
                    "type": "string",
                    "description": "Default calendar view mode"
                  },
                  "agenda.show_business_days": {
                    "type": "boolean",
                    "description": "Show only business days in calendar"
                  },
                  "agenda.business_days": {
                    "type": "array",
                    "description": "Array of business day numbers (0=Sunday, 6=Saturday)"
                  },
                  "agenda.business_hours_start": {
                    "type": "string",
                    "format": "time",
                    "description": "Business hours start time (HH:mm)"
                  },
                  "agenda.business_hours_end": {
                    "type": "string",
                    "format": "time",
                    "description": "Business hours end time (HH:mm)"
                  },
                  "agenda.show_time_start": {
                    "type": "string",
                    "format": "time",
                    "description": "Calendar visible time start (HH:mm)"
                  },
                  "agenda.show_time_end": {
                    "type": "string",
                    "format": "time",
                    "description": "Calendar visible time end (HH:mm)"
                  },
                  "agenda.hidden_days": {
                    "type": "array",
                    "description": "Array of day numbers to hide from calendar"
                  },
                  "agenda.color_mode": {
                    "type": "string",
                    "description": "Calendar color mode"
                  },
                  "agenda.appointment_state_notifications": {
                    "type": "boolean",
                    "description": "Message the responsible on appointment state changes (shared with the workshop)"
                  },
                  "agenda.orientation": {
                    "type": "string",
                    "description": "Agenda orientation: horizontal (default) or vertical"
                  },
                  "agenda.column_width": {
                    "type": "integer",
                    "description": "Employee column width in px, vertical orientation (80-400)"
                  },
                  "agenda.employees_visibility": {
                    "type": "array",
                    "description": "Bulk agenda visibility changes"
                  },
                  "agenda.employees_visibility.*.employee_id": {
                    "type": "integer",
                    "description": "Employee ID"
                  },
                  "agenda.employees_visibility.*.visible": {
                    "type": "boolean",
                    "description": "Whether the employee is shown on the agendas"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/employees/validate-login": {
      "post": {
        "summary": "Validate employee web login",
        "description": "Validates employee web login credentials. Returns validated=true with the employee ID on success, or validated=false on failure.",
        "tags": [
          "Entities",
          "Employees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Employees\\Policies\\EmployeePolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 45
                  }
                },
                "required": [
                  "login",
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidateLoginOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/employees": {
      "get": {
        "summary": "List employees",
        "description": "Returns employees with optional filtering by identification, address and contact fields. Supports limit-based pagination.",
        "tags": [
          "Entities",
          "Employees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Employees\\Policies\\EmployeePolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades:empregados"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by employee name.",
            "example": "João",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Filter by active status.",
            "example": true,
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Filter by email address.",
            "example": "joao@empresa.pt",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "web_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3,
              "minLength": 2
            },
            "deprecated": true
          },
          {
            "name": "permissions_group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "team_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "department_id",
            "in": "query",
            "required": false,
            "description": "Filter by department ID.",
            "example": 1,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "show_on_workshop_agenda",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "operator",
            "in": "query",
            "required": false,
            "description": "Default operator for simple filters (eq, ct, like, sw, ew).",
            "example": "ct",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login",
            "in": "query",
            "required": false,
            "description": "Filter by web login.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mobile_phone",
            "in": "query",
            "required": false,
            "description": "Filter by mobile phone.",
            "example": "910000000",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse ID.",
            "example": 1,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[phone2][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[email][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[email][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[web_active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[web_active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[permissions_group][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[permissions_group][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[team_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[team_code][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[department_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[department_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[show_on_workshop_agenda][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[show_on_workshop_agenda][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[mobile_phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, ct, sw, ew, in, nin. Example: filter[mobile_phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, in, nin. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters using filter[field][operator]=value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EntitiesEmployeeOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create new employee",
        "description": "Creates an employee with personal, address and contact data.",
        "tags": [
          "Entities",
          "Employees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Employees\\Policies\\EmployeePolicy",
          "ability": "create",
          "privileges": [
            "entidades:empregados:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Full name.",
                    "example": "João Silva"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Primary address.",
                    "example": "Rua das Flores, 123"
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 4,
                    "description": "Postal/ZIP code.",
                    "example": "1000-001"
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "City name.",
                    "example": "Lisboa"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254,
                    "description": "Email address (required).",
                    "example": "joao.silva@empresa.pt"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Landline phone number.",
                    "example": "212345678"
                  },
                  "permissions_group": {
                    "type": "integer",
                    "description": "Permissions group ID (required).",
                    "example": 1
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Secondary phone number.",
                    "example": "212345679"
                  },
                  "login": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 100,
                    "description": "Web login username. Defaults to email if not provided.",
                    "example": "joao.silva"
                  },
                  "password": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 8,
                    "description": "Web login password (minimum 8 characters).",
                    "example": "pass1234"
                  },
                  "web_active": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Whether web access is active. Defaults to false.",
                    "example": false
                  },
                  "team_code": {
                    "type": "number",
                    "nullable": true,
                    "description": "CRM team code.",
                    "example": 1
                  },
                  "warehouse_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Default warehouse ID.",
                    "example": 1
                  },
                  "department_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Department ID.",
                    "example": 1
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "Free-text observations.",
                    "example": "Employee note."
                  }
                },
                "required": [
                  "name",
                  "address",
                  "postal_code",
                  "city",
                  "country_code",
                  "email",
                  "permissions_group"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesEmployeeOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/employees/{employee}": {
      "get": {
        "summary": "Get employee by ID",
        "description": "Returns detailed information for a specific employee.",
        "tags": [
          "Entities",
          "Employees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Employees\\Policies\\EmployeePolicy",
          "ability": "view",
          "privileges": [
            "entidades:empregados:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesEmployeeOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update employee",
        "description": "Updates employee fields sent in the request payload. All fields are optional.",
        "tags": [
          "Entities",
          "Employees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Employees\\Policies\\EmployeePolicy",
          "ability": "update",
          "privileges": [
            "entidades:empregados:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Full name.",
                    "example": "João Silva"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Primary address.",
                    "example": "Rua das Flores, 123"
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Postal/ZIP code.",
                    "example": "1000-001"
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "City name.",
                    "example": "Lisboa"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email",
                    "maxLength": 254,
                    "description": "Email address.",
                    "example": "joao.silva@empresa.pt"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Landline phone number.",
                    "example": "212345678"
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Secondary phone number.",
                    "example": "212345679"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "login": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 100,
                    "description": "Web login username.",
                    "example": "joao.silva"
                  },
                  "password": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 8,
                    "description": "Web login password (minimum 8 characters).",
                    "example": "pass1234"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the employee is active.",
                    "example": true
                  },
                  "web_active": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Whether web access is active.",
                    "example": false
                  },
                  "permissions_group": {
                    "type": "integer",
                    "description": "Permissions group ID.",
                    "example": 1
                  },
                  "team_code": {
                    "type": "number",
                    "nullable": true,
                    "description": "CRM team code.",
                    "example": 1
                  },
                  "warehouse_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Default warehouse ID.",
                    "example": 1
                  },
                  "department_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Department ID.",
                    "example": 1
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "Free-text observations.",
                    "example": "Employee note."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesEmployeeOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/employees/{employee}/contacts": {
      "get": {
        "summary": "Get employee contacts",
        "description": "Returns a paginated list of contacts for a specific employee.",
        "tags": [
          "Entities",
          "Employees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Employees\\Policies\\EmployeePolicy",
          "ability": "view",
          "privileges": [
            "entidades:empregados:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "filter[contact_type]",
            "in": "query",
            "required": false,
            "description": "Filter by contact type (e.g. email, phone).",
            "example": "email",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[contact]",
            "in": "query",
            "required": false,
            "description": "Filter by contact value.",
            "example": "empregado@empresa.pt",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description]",
            "in": "query",
            "required": false,
            "description": "Filter by contact description.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[preferential]",
            "in": "query",
            "required": false,
            "description": "Filter by preferential flag.",
            "example": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_billing]",
            "in": "query",
            "required": false,
            "description": "Filter by billing contact flag.",
            "example": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_commercial]",
            "in": "query",
            "required": false,
            "description": "Filter by commercial contact flag.",
            "example": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_technical]",
            "in": "query",
            "required": false,
            "description": "Filter by technical contact flag.",
            "example": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_whatsapp]",
            "in": "query",
            "required": false,
            "description": "Filter by WhatsApp contact flag.",
            "example": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EmployeeContactOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/tecdoc/equivalents": {
      "get": {
        "summary": "Equivalents for a reference",
        "description": "Articles the TecDoc catalogue considers equivalent to the given reference, with the OfficeGest article code of each one that already exists locally. The reference itself is never listed as an equivalent of itself; what it resolved to travels in meta as `reference_article_code` (the local article, if any) and `reference_article_id` (its catalogue id, which is what the detail endpoint takes). When the tenant has no TecDoc credentials the answer is an empty list with `meta.tecdoc_configured = false`, which is how a consumer tells \"not configured\" from \"no equivalents\".",
        "tags": [
          "Stocks",
          "TecDoc"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Tecdoc\\Policies\\TecdocPolicy",
          "ability": "viewTecdocEquivalents",
          "notes": "The legacy widget (dashboard.id=68) carries an EMPTY dashboard.privilege, unlike hotel/esthotel (hotel:esthotel) or relatorios/bancos/saldos (bancos&relatorios:bancos:saldos). Access is decided by the TECDOC module alone, which the route group enforces. Requiring a privilege here would restrict access the legacy screen never restricted."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "reference",
            "in": "query",
            "required": true,
            "description": "Article reference to look up in the TecDoc catalogue. Matched against the catalogue article number; spacing is ignored when deciding whether a returned row is the reference itself rather than an equivalent of it.",
            "example": "376053SP",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TecdocEquivalentOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/tecdoc/articles": {
      "get": {
        "summary": "Catalogue detail for articles",
        "description": "Name, brand, barcodes and image of the given TecDoc articles. The ids come from `article_id` of the equivalents endpoint. The catalogue answers a batch as a whole: when any id in it is unknown, the answer is an empty list for every id, not a shorter one.",
        "tags": [
          "Stocks",
          "TecDoc"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Tecdoc\\Policies\\TecdocPolicy",
          "ability": "viewTecdocArticles",
          "notes": "The legacy widget (dashboard.id=68) carries an EMPTY dashboard.privilege, unlike hotel/esthotel (hotel:esthotel) or relatorios/bancos/saldos (bancos&relatorios:bancos:saldos). Access is decided by the TECDOC module alone, which the route group enforces. Requiring a privilege here would restrict access the legacy screen never restricted."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "description": "TecDoc article ids, as returned in `article_id` by the equivalents endpoint. Duplicates are dropped before the catalogue is called; a blank id is rejected with 422.",
            "example": [
              "9876543",
              "9876544"
            ],
            "schema": {
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TecdocArticleOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/pricesbycustomer": {
      "post": {
        "summary": "Get prices for a large list of articles for a specific customer",
        "description": "POST variant of the customer price lookup. Use when the article list is too large for query string parameters.",
        "tags": [
          "Stocks",
          "Prices"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\PricesByCustomerPolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "description": "Customer ID",
                    "example": 210922
                  },
                  "articles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of article IDs",
                    "example": [
                      "ART001",
                      "ART002"
                    ]
                  }
                },
                "required": [
                  "customer_id",
                  "articles"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Prices resolved per article",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/pricesbycustomer/{customer}": {
      "get": {
        "summary": "Get prices for a list of articles for a specific customer",
        "description": "Returns calculated prices for the given articles applying customer-specific pricing rules, classification discounts, price table rules and PCU margins.",
        "tags": [
          "Stocks",
          "Prices"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\PricesByCustomerPolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "articles",
            "in": "query",
            "required": true,
            "description": "List of article IDs",
            "example": [
              "ART001",
              "ART002"
            ],
            "schema": {
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Prices resolved per article",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/agenda-settings": {
      "get": {
        "summary": "Get agenda settings",
        "description": "Returns the current user's active agenda settings and all available setting profiles (default, personal, department).",
        "tags": [
          "Workshop Agenda Settings"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\AgendaSettings\\Policies\\AgendaSettingsPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgendaSettingsOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Save agenda settings",
        "description": "Saves a settings profile (default, personal or department) and sets it as the current user's active preference.",
        "tags": [
          "Workshop Agenda Settings"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\AgendaSettings\\Policies\\AgendaSettingsPolicy",
          "ability": "update"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "default",
                      "user",
                      "department"
                    ]
                  },
                  "relation_id": {
                    "type": "number"
                  },
                  "config": {
                    "type": "object",
                    "properties": {
                      "confirmation_status": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "subject": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "reception_date": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "delivery_date": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "technician": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "license_plate": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "vehicle_details": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "service_order": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "interventions": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "entities": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "process_code": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      },
                      "awaiting_parts": {
                        "type": "string",
                        "enum": [
                          "none",
                          "card",
                          "popover",
                          "both"
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgendaSettingsOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/tasks/{id}/note": {
      "get": {
        "summary": "Get the additional description of one task",
        "description": "The text behind the comments icon of the legacy dashboard widget crm/tarefas_home, which fetched it on demand (_ajax action ObsMarcacao) rather than carrying it in the list. It is the same column the tasks report answers has_report from, so the flag and the text cannot disagree. Scoped to the authenticated employee: another employee task answers 404.",
        "tags": [
          "Crm",
          "Tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Tasks\\Policies\\TaskPolicy",
          "ability": "view",
          "privileges": [
            "crm:tarefas"
          ],
          "notes": "Same privilege as the legacy tasks screen and the dashboard widget (crm:tarefas). The endpoint additionally scopes to the caller own tasks."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskNoteOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/tasks/{id}": {
      "patch": {
        "summary": "Update one task",
        "description": "Flips the done flag and writes the closing note, the two things the legacy dashboard widget did when the reader used its complete button (_ajax action UpdateRelcontactoHome). Completing also stamps when the task ended, which the report serves as ended_at. Scoped to the authenticated employee: another employee task answers 404.",
        "tags": [
          "Crm",
          "Tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Tasks\\Policies\\TaskPolicy",
          "ability": "update",
          "privileges": [
            "crm:tarefas:edit"
          ],
          "notes": "The legacy dashboard widget rendered its complete button without any privilege check; this endpoint requires the edit privilege the tasks screen already uses."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "completed": {
                    "type": "boolean",
                    "description": "Whether the task is done. Completing it also stamps when it ended."
                  },
                  "note": {
                    "type": "string",
                    "description": "Closing note, written to the second additional description (relcontacto.Relatorio2) — the field the legacy widget wrote when completing a task. It does not touch the description GET /v2/crm/tasks/{id}/note returns."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/prices-table": {
      "get": {
        "summary": "List price table rules",
        "description": "Returns price and discount rules. Supports filtering by articles, classifications, and creation/update date ranges.",
        "tags": [
          "Stocks",
          "Prices"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePriceTablePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos:tab:tprecos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "articles",
            "in": "query",
            "required": false,
            "description": "Filter by article IDs",
            "example": [
              "ART001",
              "ART002"
            ],
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "classifications",
            "in": "query",
            "required": false,
            "description": "Filter by classification codes",
            "example": [
              "CL01",
              "CL02"
            ],
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date (single day: Y-m-d)",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date (single day: Y-m-d)",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "created_at.from",
            "in": "query",
            "required": false,
            "description": "Creation date start (Y-m-d H:i:s)",
            "example": "2026-01-01 00:00:00",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "created_at.to",
            "in": "query",
            "required": false,
            "description": "Creation date end (Y-m-d H:i:s)",
            "example": "2026-01-31 23:59:59",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at.from",
            "in": "query",
            "required": false,
            "description": "Update date start (Y-m-d H:i:s)",
            "example": "2026-01-01 00:00:00",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at.to",
            "in": "query",
            "required": false,
            "description": "Update date end (Y-m-d H:i:s)",
            "example": "2026-01-31 23:59:59",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticlePriceTable"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create or update a price table rule",
        "description": "Creates a new price/discount rule for an article. If a rule already exists for the same article, classification and payment\n        method combination, it is updated instead.",
        "tags": [
          "Stocks",
          "Prices"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePriceTablePolicy",
          "ability": "create",
          "privileges": [
            "stocks:artigos:tab:tprecos:edit"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "article_id": {
                    "type": "string",
                    "description": "Article ID",
                    "example": "ART001"
                  },
                  "price": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Price value (>= 0)",
                    "example": 25.5
                  },
                  "classification_id": {
                    "type": "string",
                    "description": "Classification code",
                    "example": "CL01"
                  },
                  "payment_method_id": {
                    "type": "string",
                    "description": "Payment method code",
                    "example": "FP01"
                  },
                  "description": {
                    "type": "string",
                    "description": "Rule description",
                    "example": "Summer promotion"
                  },
                  "discount_perc": {
                    "type": "number",
                    "description": "Discount percentage (0-100)",
                    "example": 5
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Start date (Y-m-d)",
                    "example": "2026-01-01"
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date",
                    "description": "End date (Y-m-d)",
                    "example": "2026-12-31"
                  }
                },
                "required": [
                  "article_id",
                  "price"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rule updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticlePriceTable"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "201": {
            "description": "Rule created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticlePriceTable"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/prices-table-for-article": {
      "post": {
        "summary": "Resolve price for an article in a given context",
        "description": "Returns the best matching price rule for the given article, applying classification, payment method and date priority fallback\n        logic.",
        "tags": [
          "Stocks",
          "Prices"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePriceTablePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos:tab:tprecos"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "article_id": {
                    "type": "string",
                    "description": "Article ID",
                    "example": "ART001"
                  },
                  "classification_id": {
                    "type": "string",
                    "description": "Classification code",
                    "example": "CL01"
                  },
                  "payment_method_id": {
                    "type": "string",
                    "description": "Payment method code",
                    "example": "FP01"
                  },
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Reference date for price lookup (Y-m-d), defaults to today",
                    "example": "2026-01-15"
                  },
                  "id_discount_type": {
                    "type": "string",
                    "description": "Discount type ID used as fallback",
                    "example": "1"
                  }
                },
                "required": [
                  "article_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticlePriceTable"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/appointments/receptions-deliveries": {
      "get": {
        "summary": "List reception and delivery events",
        "description": "Returns reception and delivery events derived from service orders and workshop appointments within the given date range, ordered chronologically. Pairs (appointment with associated service order) collapse to a single event using the service order as canonical source, falling back to the appointment when the service order has no value for the relevant timestamp. Appointments marked as no-show are excluded, both as standalone events and as fallback source for service order timestamps. Receptions and deliveries are filtered apart by the workshop agenda parameters: the service order statuses each one shows and whether it shows appointments without a service order. A side with neither set shows everything.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "Inclusive lower bound of the range (ISO 8601).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "Inclusive upper bound of the range (ISO 8601).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Keeps only the events of this warehouse, read from the service order, or from the appointment when it has no service order. Omitted or 0 lists every warehouse.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReceptionDeliveryEventOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/parameters": {
      "get": {
        "summary": "Get workshop parameters",
        "description": "Returns the workshop parameters grouped by topic. The agenda topic follows the oficinas:agenda privilege; the configuration topics require configuracoes:parametros.",
        "tags": [
          "Workshop Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic, including the legacy agenda topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update workshop parameters",
        "description": "Updates workshop module parameters. Only provided fields are changed (partial update).",
        "tags": [
          "Workshop Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agenda": {
                    "type": "object",
                    "properties": {
                      "default_view": {
                        "type": "string"
                      },
                      "show_business_days": {
                        "type": "boolean"
                      },
                      "business_days": {
                        "type": "array"
                      },
                      "business_hours_start": {
                        "type": "string",
                        "nullable": true
                      },
                      "business_hours_end": {
                        "type": "string",
                        "nullable": true
                      },
                      "show_time_start": {
                        "type": "string",
                        "nullable": true
                      },
                      "show_time_end": {
                        "type": "string",
                        "nullable": true
                      },
                      "hidden_days": {
                        "type": "array"
                      },
                      "allocated_time_margin_percentage": {
                        "type": "number"
                      },
                      "group_by_mechanic": {
                        "type": "boolean"
                      },
                      "group_by_department": {
                        "type": "boolean"
                      },
                      "allow_appointments_on_holidays": {
                        "type": "boolean"
                      },
                      "allow_appointments_on_vacations": {
                        "type": "boolean"
                      },
                      "allow_appointments_on_absences": {
                        "type": "boolean"
                      },
                      "allow_appointments_outside_business_hours": {
                        "type": "boolean"
                      },
                      "employee_concurrent_appointments": {
                        "type": "number"
                      },
                      "intervention_groups_enabled": {
                        "type": "boolean"
                      },
                      "reception_delivery_single_event": {
                        "type": "boolean"
                      },
                      "reception_delivery_order": {
                        "type": "string",
                        "enum": [
                          "by_time",
                          "receptions_first",
                          "deliveries_first"
                        ]
                      },
                      "timeline_occupancy_enabled": {
                        "type": "boolean"
                      },
                      "service_order_creation": {
                        "type": "string",
                        "enum": [
                          "none",
                          "draft",
                          "issued"
                        ]
                      },
                      "service_order_initial_status": {
                        "type": "string",
                        "nullable": true,
                        "description": "Valid value from ordemservico_estados.code."
                      },
                      "split_planning_enabled": {
                        "type": "boolean"
                      },
                      "appointment_state_notifications": {
                        "type": "boolean"
                      },
                      "notify_by_email_default": {
                        "type": "boolean"
                      },
                      "notify_by_sms_default": {
                        "type": "boolean"
                      },
                      "min_segment_minutes": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "max_segments": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "max_spill_days": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "heatmap_days": {
                        "type": "integer",
                        "minimum": 3,
                        "maximum": 30
                      },
                      "heatmap_color_mode": {
                        "type": "string",
                        "enum": [
                          "accent",
                          "traffic_light"
                        ]
                      },
                      "heatmap_window_mode": {
                        "type": "string",
                        "enum": [
                          "days_from_reception",
                          "reception_to_delivery"
                        ]
                      },
                      "reception_without_service_order": {
                        "type": "boolean"
                      },
                      "delivery_without_service_order": {
                        "type": "boolean"
                      },
                      "color_mode": {
                        "type": "string",
                        "enum": [
                          "completed",
                          "category",
                          "employee",
                          "service_order"
                        ]
                      },
                      "orientation": {
                        "type": "string",
                        "enum": [
                          "horizontal",
                          "vertical"
                        ]
                      },
                      "column_width": {
                        "type": "integer",
                        "minimum": 80,
                        "maximum": 400
                      },
                      "reception_service_order_statuses": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "nullable": true,
                          "description": "Valid value from ordemservico_estados.code."
                        }
                      },
                      "delivery_service_order_statuses": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "nullable": true,
                          "description": "Valid value from ordemservico_estados.code."
                        }
                      },
                      "agenda_order_departments": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "agenda_order_employees": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "employees_visibility": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "employee_id": {
                              "type": "integer",
                              "minimum": 1,
                              "description": "Employee ID.",
                              "example": 12
                            },
                            "visible": {
                              "type": "boolean",
                              "description": "Whether the employee is shown on the workshop and CRM agendas.",
                              "example": true
                            }
                          }
                        },
                        "description": "Employees whose agenda visibility changed, applied in bulk.",
                        "example": [
                          {
                            "employee_id": 12,
                            "visible": true
                          },
                          {
                            "employee_id": 34,
                            "visible": false
                          }
                        ]
                      },
                      "departments_visibility": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "department_id": {
                              "type": "integer",
                              "minimum": 1,
                              "description": "Department ID.",
                              "example": 3
                            },
                            "visible": {
                              "type": "boolean",
                              "description": "Whether the department is shown on the workshop agenda.",
                              "example": false
                            }
                          }
                        },
                        "description": "Departments whose workshop agenda visibility changed, applied in bulk.",
                        "example": [
                          {
                            "department_id": 3,
                            "visible": false
                          },
                          {
                            "department_id": 5,
                            "visible": true
                          }
                        ]
                      }
                    }
                  },
                  "service_orders": {
                    "type": "object",
                    "properties": {
                      "link_purchase_line_plate_to_last_open_order": {
                        "type": "boolean"
                      },
                      "purchase_plate_search_statuses": {
                        "type": "array"
                      },
                      "uses_checklist": {
                        "type": "boolean"
                      },
                      "default_checklists": {
                        "type": "array"
                      },
                      "required_fields": {
                        "type": "array"
                      },
                      "uses_service_articles_as_tasks": {
                        "type": "boolean"
                      },
                      "service_article_task_units": {
                        "type": "array"
                      },
                      "upcoming_agenda_days": {
                        "type": "integer"
                      },
                      "uses_legacy_agenda_week_view": {
                        "type": "boolean"
                      },
                      "default_labour_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "mobile_app_status_filter": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "all",
                          "completed_only"
                        ]
                      },
                      "process_observations_source": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "observations",
                          "internal_observations"
                        ]
                      },
                      "labour_units_for_internal_document": {
                        "type": "array"
                      },
                      "auto_inserted_articles": {
                        "type": "array"
                      },
                      "auto_inserted_interventions": {
                        "type": "array"
                      },
                      "show_employee_who_added_article": {
                        "type": "boolean"
                      },
                      "allow_invoicing_when_closed": {
                        "type": "boolean"
                      },
                      "auto_move_articles_to_extra": {
                        "type": "boolean"
                      },
                      "validate_checklist_on_close": {
                        "type": "boolean"
                      },
                      "print_customer_observations_by_default": {
                        "type": "boolean"
                      },
                      "print_technician_observations_by_default": {
                        "type": "boolean"
                      },
                      "statuses_blocked_awaiting_parts_or_authorization": {
                        "type": "array"
                      }
                    }
                  },
                  "documents": {
                    "type": "object",
                    "properties": {
                      "service_order_columns": {
                        "type": "array"
                      },
                      "service_order_extra_columns": {
                        "type": "array"
                      }
                    }
                  },
                  "stock": {
                    "type": "object",
                    "properties": {
                      "updated_by_service_orders": {
                        "type": "boolean"
                      },
                      "block_negative_on_service_orders": {
                        "type": "boolean"
                      },
                      "service_order_movement_type": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "pricing": {
                    "type": "object",
                    "properties": {
                      "labour_rate_1": {
                        "type": "number"
                      },
                      "labour_rate_2": {
                        "type": "number"
                      },
                      "labour_rate_3": {
                        "type": "number"
                      },
                      "show_process_profit_margin": {
                        "type": "boolean"
                      },
                      "show_process_profit_margin_percentage": {
                        "type": "boolean"
                      }
                    }
                  },
                  "technicians": {
                    "type": "object",
                    "properties": {
                      "session_timeout_minutes": {
                        "type": "integer"
                      },
                      "intervention_time_unit": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "minutes",
                          "hours"
                        ]
                      },
                      "time_tracking_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "service_order",
                          "intervention"
                        ]
                      },
                      "manages_operations": {
                        "type": "boolean"
                      },
                      "show_on_screen_keyboard": {
                        "type": "boolean"
                      },
                      "show_company_monthly_target": {
                        "type": "boolean"
                      },
                      "uses_equivalent_articles": {
                        "type": "boolean"
                      },
                      "filter_service_orders_by_department": {
                        "type": "boolean"
                      },
                      "auto_logout_on_order_close": {
                        "type": "boolean"
                      },
                      "lunch_end_time": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "vehicles": {
                    "type": "object",
                    "properties": {
                      "inspection_category": {
                        "type": "string",
                        "nullable": true
                      },
                      "default_typology": {
                        "type": "string",
                        "nullable": true
                      },
                      "oil_family": {
                        "type": "string",
                        "nullable": true
                      },
                      "tire_family": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_tire_management": {
                        "type": "boolean"
                      },
                      "required_fields_on_create": {
                        "type": "array"
                      }
                    }
                  },
                  "notifications": {
                    "type": "object",
                    "properties": {
                      "vehicle_with_open_service_order_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "service_order_pending_invoicing_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn"
                        ]
                      },
                      "service_order_without_technician_times_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn"
                        ]
                      },
                      "vehicle_with_open_quote_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn"
                        ]
                      },
                      "sms_excluded_statuses": {
                        "type": "array"
                      },
                      "authorization_responsible_employees": {
                        "type": "array"
                      }
                    }
                  },
                  "integrations": {
                    "type": "object",
                    "properties": {
                      "drive360_price_percentage": {
                        "type": "number"
                      },
                      "drive360_search_equivalent_references": {
                        "type": "boolean"
                      },
                      "drive360_auto_order": {
                        "type": "boolean"
                      },
                      "drive360_auto_order_employee": {
                        "type": "string",
                        "nullable": true
                      },
                      "drive360_auto_order_quantity": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "minimum_stock",
                          "replenishment_stock"
                        ]
                      },
                      "drive360_auto_order_times": {
                        "type": "array"
                      },
                      "uses_tecdoc_plate_lookup": {
                        "type": "boolean"
                      },
                      "datadrive_employee": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_maisvalor_v3": {
                        "type": "boolean"
                      },
                      "create_business_updates_sale_price": {
                        "type": "boolean"
                      },
                      "create_business_updates_families": {
                        "type": "boolean"
                      },
                      "create_business_updates_brands": {
                        "type": "boolean"
                      },
                      "create_business_supplier": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "document_chat": {
                    "type": "object",
                    "properties": {
                      "save_messages_as_notes": {
                        "type": "boolean"
                      },
                      "save_files_as_attachments": {
                        "type": "boolean"
                      },
                      "reflect_message_edits": {
                        "type": "boolean"
                      },
                      "reflect_message_deletions": {
                        "type": "boolean"
                      }
                    }
                  },
                  "agenda.employees_visibility": {
                    "type": "array",
                    "description": "Employees whose agenda visibility changed, applied in bulk.",
                    "example": [
                      {
                        "employee_id": 12,
                        "visible": true
                      },
                      {
                        "employee_id": 34,
                        "visible": false
                      }
                    ]
                  },
                  "agenda.employees_visibility.*.employee_id": {
                    "type": "integer",
                    "description": "Employee ID.",
                    "example": 12
                  },
                  "agenda.employees_visibility.*.visible": {
                    "type": "boolean",
                    "description": "Whether the employee is shown on the workshop and CRM agendas.",
                    "example": true
                  },
                  "agenda.departments_visibility": {
                    "type": "array",
                    "description": "Departments whose workshop agenda visibility changed, applied in bulk.",
                    "example": [
                      {
                        "department_id": 3,
                        "visible": false
                      },
                      {
                        "department_id": 5,
                        "visible": true
                      }
                    ]
                  },
                  "agenda.departments_visibility.*.department_id": {
                    "type": "integer",
                    "description": "Department ID.",
                    "example": 3
                  },
                  "agenda.departments_visibility.*.visible": {
                    "type": "boolean",
                    "description": "Whether the department is shown on the workshop agenda.",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/support/appointment-categories": {
      "get": {
        "summary": "List appointment categories",
        "description": "Returns all appointment categories available in the system.",
        "tags": [
          "Appointment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\AppointmentCategories\\Policies\\AppointmentCategoryPolicy",
          "ability": "viewAny",
          "privileges": [
            "crm:marcacoes:view:all"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AppointmentCategoryOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create appointment category",
        "description": "Creates a new appointment category with the provided configuration.",
        "tags": [
          "Appointment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\AppointmentCategories\\Policies\\AppointmentCategoryPolicy",
          "ability": "create",
          "privileges": [
            "crm:marcacoes:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique category identifier (e.g., CAT001)",
                    "example": "CAT001"
                  },
                  "name": {
                    "type": "string",
                    "description": "Category display name",
                    "example": "Reunião de Vendas"
                  },
                  "color": {
                    "type": "string",
                    "description": "Hex color code for UI representation (e.g., #FF5733)",
                    "example": "#FF5733"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentCategoryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error - ID already exists or invalid color format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/support/appointment-categories/{id}": {
      "get": {
        "summary": "Get appointment category by ID",
        "description": "Returns detailed information for a specific appointment category.",
        "tags": [
          "Appointment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\AppointmentCategories\\Policies\\AppointmentCategoryPolicy",
          "ability": "view",
          "privileges": [
            "crm:marcacoes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentCategoryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update appointment category",
        "description": "Updates an existing appointment category with the provided data.",
        "tags": [
          "Appointment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\AppointmentCategories\\Policies\\AppointmentCategoryPolicy",
          "ability": "update",
          "privileges": [
            "crm:marcacoes:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Category display name",
                    "example": "Reunião de Vendas Atualizada"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "/^#[a-fA-F0-9]{6}$/",
                    "description": "Hex color code for UI representation (e.g., #FF5733)",
                    "example": "#33FF57"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentCategoryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Category not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error - invalid color format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete appointment category",
        "description": "Removes an appointment category from the system.",
        "tags": [
          "Appointment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\AppointmentCategories\\Policies\\AppointmentCategoryPolicy",
          "ability": "delete",
          "privileges": [
            "crm:marcacoes:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AppointmentCategoryOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/reports/business-opportunities": {
      "get": {
        "summary": "Get open business opportunities grouped by one view",
        "description": "Returns every OPEN business opportunity (oportneg.Concluido_c = F), with no date window, grouped by one\n        of six views — business_area, seller, phase, origin, customer or prospect — and with the second level of\n        the chart inlined: each group carries the opportunities that make it up, so a drilldown needs no second\n        request. This is the data behind the legacy dashboard widget crm/includes/graph_oportneg (dashboard.id=1)\n        and its OGMF consumer. Groups are keyed by LABEL, so two records of the domain sharing a designation\n        collapse into one group, and a group whose label is missing (including orphan foreign keys) comes back\n        with label null, untranslated — the legacy widget renders it as \"not applicable\"; the literal string\n        \"null\" and an empty label land in that same bucket, and no opportunity is ever dropped. Groups come in\n        first-seen\n        order (designation ascending, code ascending) rather than sorted by count: that is the order the legacy\n        widget shows. Employee scoping is decided by the server: with the crm:oportunidadesnegocios:view:all\n        privilege the employees[] filter is honoured and omitting it means every employee, and WITHOUT that\n        privilege the caller always gets only their own opportunities and employees[] is ignored rather than\n        rejected.",
        "tags": [
          "Crm",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Reports\\Policies\\CrmReportsPolicy",
          "ability": "viewBusinessOpportunities",
          "privileges": [
            "crm:oportunidadesnegocios"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget crm/includes/graph_oportneg (dashboard.id=1). Single ability for the endpoint, regardless of the requested dimension. The crm:oportunidadesnegocios:view:all sub-privilege is NOT an ability: it only widens the employee scope (see OpportunityEmployeeScope)."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "dimension",
            "in": "query",
            "required": true,
            "description": "The view to group by: business_area, seller, phase, origin, customer or prospect. customer and prospect group by the same third-party name and differ only by the third-party type they keep. Required.",
            "example": "business_area",
            "schema": {
              "type": "string",
              "enum": [
                "business_area",
                "seller",
                "phase",
                "origin",
                "customer",
                "prospect"
              ]
            }
          },
          {
            "name": "employees",
            "in": "query",
            "required": false,
            "description": "Employee ids (empreg.CodEmpr) to filter by (employees[]=3&employees[]=5). Omitted or empty means every employee. Only honoured with the crm:oportunidadesnegocios:view:all privilege: without it the caller always gets their own opportunities and this parameter is ignored.",
            "schema": {
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested view and one group per label, each with its opportunities inlined.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "dimension": {
                          "type": "string",
                          "enum": [
                            "business_area",
                            "seller",
                            "phase",
                            "origin",
                            "customer",
                            "prospect"
                          ],
                          "description": "Echo of the requested view, so the consumer can title the chart without keeping state of its own."
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "nullable": true,
                                "description": "Group label, raw and never translated. Null is the no-label bucket: the business area, phase, origin, seller or third-party name is missing, is the literal string \"null\", or is an empty string, including orphan foreign keys. At most one group carries it, and translating it is the consumer's job (the legacy widget shows \"not applicable\"). No opportunity is ever dropped: every open one in scope lands in exactly one group."
                              },
                              "count": {
                                "type": "integer",
                                "description": "Number of open opportunities in the group; always equal to the length of opportunities."
                              },
                              "total_estimated_value": {
                                "type": "number",
                                "description": "Sum of the estimated values of the group, nulls counted as 0, rounded to 2 decimals."
                              },
                              "opportunities": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "description": "Opportunity primary key (oportneg.CodOportNeg), a document-number STRING such as \"1809-0004\" — never an integer, so do not parse or coerce it to a number. Compose the navigation to the record with it: no URL travels in the response."
                                    },
                                    "designation": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Opportunity designation, never translated."
                                    },
                                    "estimated_value": {
                                      "type": "number",
                                      "nullable": true,
                                      "description": "Raw estimated value (oportneg.ValorEstimado). Null when never filled in and 0.0 when genuinely zero — the two are distinguishable here, unlike in the legacy widget, which collapses both into a bar drawn below the axis."
                                    },
                                    "registered_at": {
                                      "type": "string",
                                      "format": "date-time",
                                      "nullable": true,
                                      "description": "When the opportunity was registered (oportneg.DataReg), ISO-8601."
                                    },
                                    "phase_started_at": {
                                      "type": "string",
                                      "format": "date-time",
                                      "nullable": true,
                                      "description": "When the current sales-cycle phase started (oportneg.DataFase), ISO-8601."
                                    },
                                    "phase_deadline": {
                                      "type": "string",
                                      "format": "date-time",
                                      "nullable": true,
                                      "description": "Deadline of the current phase (oportneg.datafimfase), ISO-8601. Null means NO deadline, a third state: the legacy widget paints those red like an overdue one, which is an accident of its date comparison, not a rule to reproduce. Derive overdue on the client."
                                    },
                                    "entity_type": {
                                      "type": "string",
                                      "enum": [
                                        "customer",
                                        "prospect",
                                        "supplier"
                                      ],
                                      "description": "Third-party type (oportneg.TipoTerc): C customer, P prospect, F supplier. Any other value reads as customer, mirroring the legacy match."
                                    },
                                    "entity_code": {
                                      "type": "integer",
                                      "nullable": true,
                                      "description": "Third-party code (oportneg.CodTerc)."
                                    },
                                    "entity_name": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Third-party name. Null when the code has no row in the entities view."
                                    },
                                    "employee_code": {
                                      "type": "integer",
                                      "nullable": true,
                                      "description": "Employee the opportunity belongs to (oportneg.CodEmpr)."
                                    },
                                    "employee_name": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Employee name. Null when the opportunity has no employee, or when the employee code has no row in empreg."
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "designation",
                                    "estimated_value",
                                    "registered_at",
                                    "phase_started_at",
                                    "phase_deadline",
                                    "entity_type",
                                    "entity_code",
                                    "entity_name",
                                    "employee_code",
                                    "employee_name"
                                  ]
                                },
                                "description": "The second level of the chart, ALWAYS inlined and never empty: one row per opportunity of the group, in the same scan order (designation ascending, code ascending)."
                              }
                            },
                            "required": [
                              "label",
                              "count",
                              "total_estimated_value",
                              "opportunities"
                            ]
                          },
                          "description": "One group per distinct label of the requested view, in first-seen order. Empty when the scope has no open opportunity — never a 404."
                        }
                      },
                      "required": [
                        "dimension",
                        "groups"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/reports/expiring-opportunities": {
      "get": {
        "summary": "List the caller's open business opportunities whose current phase deadline has passed",
        "description": "Returns every OPEN business opportunity (oportneg.Concluido_c = F) belonging to the calling user whose current sales-cycle phase deadline has passed -- either the phase itself has no next-scheduled-date slack left, or its own final deadline is in the past. This is the data behind the legacy dashboard widget crm/includes/oportnegocio_expiradas (dashboard.id=18). Unlike the sibling business-opportunities endpoint (card #2181), this widget has no employee multi-select and no view:all privilege: it always scopes to the caller's own opportunities, with no parameters to request otherwise. A flat list, no grouping and no drilldown.",
        "tags": [
          "Crm",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Reports\\Policies\\CrmReportsPolicy",
          "ability": "viewExpiringOpportunities",
          "privileges": [
            "crm:oportunidadesnegocios"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget crm/includes/oportnegocio_expiradas (dashboard.id=18). Same privilege as viewBusinessOpportunities (both widgets share dashboard.privilege), kept as a distinct ability because it is a distinct endpoint/resource (card #2185). Unlike viewBusinessOpportunities, there is no view:all scoping here: the legacy widget always scopes to the caller's own opportunities with no override."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "The caller's open opportunities whose current phase deadline has passed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Opportunity primary key (oportneg.CodOportNeg), a document-number STRING such as \"1809-0004\" -- never an integer. Compose the navigation to the record with it: no URL travels in the response."
                          },
                          "designation": {
                            "type": "string",
                            "nullable": true,
                            "description": "Opportunity designation, never translated."
                          },
                          "entity_type": {
                            "type": "string",
                            "enum": [
                              "customer",
                              "prospect",
                              "supplier"
                            ],
                            "description": "Third-party type (oportneg.TipoTerc): C customer, P prospect, F supplier. Any other value reads as customer, mirroring the legacy match."
                          },
                          "entity_code": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Third-party code (oportneg.CodTerc)."
                          },
                          "entity_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "Third-party name. Null when the code has no row in the entities view."
                          },
                          "current_phase": {
                            "type": "string",
                            "nullable": true,
                            "description": "Name of the sales-cycle phase the opportunity is currently in (fasesciclovenda.Designacao). Null when the phase catalog has no matching row."
                          },
                          "phase_started_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "When the current phase started (oportneg.DataInicio), ISO-8601."
                          },
                          "next_scheduled_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true,
                            "description": "Next scheduled follow-up date for the current phase (oportneglogfases.DataSeguinte), ISO-8601."
                          },
                          "overdue_minutes": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Minutes the phase deadline has been overdue by. Raw value, never formatted as a \"Xd Yh Zm\" string -- the legacy widget does that formatting itself, and this contract leaves it to the consumer. Always positive for an opportunity in this list."
                          }
                        },
                        "required": [
                          "code",
                          "designation",
                          "entity_type",
                          "entity_code",
                          "entity_name",
                          "current_phase",
                          "phase_started_at",
                          "next_scheduled_at",
                          "overdue_minutes"
                        ]
                      },
                      "description": "Every OPEN business opportunity of the calling user whose current phase deadline has passed. Empty when none -- never a 404."
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/reports/tasks": {
      "get": {
        "summary": "Get the authenticated user tasks, split into pending and done",
        "description": "This is the data behind the legacy dashboard widget crm/tarefas_home (dashboard.id=12) and its OGMF consumer. Replicates crm.class.php::listaTarefasHome() exactly: CRM tasks (ETarefa=T) owned by the authenticated employee, with no parameter to view another employee tasks — the legacy widget never had that capability either. Both groups (pending = Realizado=F, done = Realizado=T) come back in one response, ordered by task id ascending, each capped independently by limit (default 10, same as the legacy widget), because the legacy widget always rendered both tabs from the same page load rather than two independent requests. has_report only echoes whether the task carries a non-empty report text (the legacy table shows a comments icon for it) — the report text itself is never returned. expected_at is the deadline the task form edits (DataPrevRealiz); ended_at is when the task actually ended (DataHFim), the column the legacy widget drew. task_type_id is a code — the names come from GET /v2/crm/support/task-types.",
        "tags": [
          "Crm",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Reports\\Policies\\CrmReportsPolicy",
          "ability": "viewTasks",
          "privileges": [
            "crm:tarefas"
          ],
          "notes": "Mirrors dashboard.privilege (crm:tarefas) of the legacy widget crm/tarefas_home (dashboard.id=12). Single, non-compound privilege: no ability is selected by a request parameter, so there is no bypass surface between two authorization levels."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of tasks per group (pending/done).",
            "example": "10",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The pending and done task groups for the authenticated employee.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Task primary key (relcontacto.NumRel). Compose the navigation to the record with it: no URL travels in the response."
                              },
                              "subject": {
                                "type": "string",
                                "nullable": true,
                                "description": "Task subject (relcontacto.Assunto), never translated."
                              },
                              "has_report": {
                                "type": "boolean",
                                "description": "Whether the task carries a non-empty report text (relcontacto.Relatorio). The report text itself is never returned: the legacy widget only uses this to decide whether to show the comments icon."
                              },
                              "task_type_id": {
                                "type": "string",
                                "nullable": true,
                                "description": "Task type code (relcontacto.CodTipoEv). The names live in GET /v2/crm/support/task-types; this report does not join them."
                              },
                              "priority": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "high",
                                  "normal",
                                  "low"
                                ],
                                "description": "Task priority (relcontacto.Prioridade H/N/L). Null when the column holds anything outside that set, which real tenants do carry."
                              },
                              "progress": {
                                "type": "integer",
                                "description": "Execution percentage (relcontacto.perc_execution), 0-100."
                              },
                              "expected_at": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "Task deadline (relcontacto.DataPrevRealiz), ISO-8601 — the date the task form edits. Null when absent or a legacy zero-date sentinel."
                              },
                              "ended_at": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "When the task actually ended (relcontacto.DataHFim), ISO-8601. This is the column the legacy widget read for its calendar icon; it is empty on every task of some tenants. Null when absent or a legacy zero-date sentinel."
                              }
                            },
                            "required": [
                              "id",
                              "subject",
                              "has_report",
                              "task_type_id",
                              "priority",
                              "progress",
                              "expected_at",
                              "ended_at"
                            ]
                          },
                          "description": "Tasks of the calling employee still to do (Realizado=F), by id ascending. Empty when none -- never a 404."
                        },
                        "done": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Task primary key (relcontacto.NumRel). Compose the navigation to the record with it: no URL travels in the response."
                              },
                              "subject": {
                                "type": "string",
                                "nullable": true,
                                "description": "Task subject (relcontacto.Assunto), never translated."
                              },
                              "has_report": {
                                "type": "boolean",
                                "description": "Whether the task carries a non-empty report text (relcontacto.Relatorio). The report text itself is never returned: the legacy widget only uses this to decide whether to show the comments icon."
                              },
                              "task_type_id": {
                                "type": "string",
                                "nullable": true,
                                "description": "Task type code (relcontacto.CodTipoEv). The names live in GET /v2/crm/support/task-types; this report does not join them."
                              },
                              "priority": {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  "high",
                                  "normal",
                                  "low"
                                ],
                                "description": "Task priority (relcontacto.Prioridade H/N/L). Null when the column holds anything outside that set, which real tenants do carry."
                              },
                              "progress": {
                                "type": "integer",
                                "description": "Execution percentage (relcontacto.perc_execution), 0-100."
                              },
                              "expected_at": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "Task deadline (relcontacto.DataPrevRealiz), ISO-8601 — the date the task form edits. Null when absent or a legacy zero-date sentinel."
                              },
                              "ended_at": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "When the task actually ended (relcontacto.DataHFim), ISO-8601. This is the column the legacy widget read for its calendar icon; it is empty on every task of some tenants. Null when absent or a legacy zero-date sentinel."
                              }
                            },
                            "required": [
                              "id",
                              "subject",
                              "has_report",
                              "task_type_id",
                              "priority",
                              "progress",
                              "expected_at",
                              "ended_at"
                            ]
                          },
                          "description": "Tasks of the calling employee already done (Realizado=T), by id ascending. Empty when none -- never a 404."
                        }
                      },
                      "required": [
                        "pending",
                        "done"
                      ],
                      "description": "Both groups come back in one response, each capped independently by limit, because the legacy widget always rendered its two tabs from a single page load."
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/reports/activity-plan": {
      "get": {
        "summary": "List the activity plan: pending assistances, opportunities and appointments in one list",
        "description": "Merges three sources into a single list ordered by date: open assistances (only when the tenant has the CONTRATOS module), open business opportunities whose current phase deadline has passed, and unfinished appointments whose end date has passed. This is the data behind the legacy dashboard widget crm/includes/plano_actividade (dashboard.id=16). Unlike the sibling expiring-opportunities endpoint, this one is not scoped to the caller: it mirrors the legacy widget, whose employee selector lists every employee and whose query applies no per-employee restriction. Pass employee_id to narrow it. A flat list, no grouping and no drilldown.",
        "tags": [
          "Crm",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Reports\\Policies\\CrmReportsPolicy",
          "ability": "viewActivityPlan",
          "privileges": [
            "crm"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget crm/includes/plano_actividade (dashboard.id=16), which is the bare crm privilege, not a compound one. This endpoint is NOT scoped to the caller: the legacy widget lists every employee in its selector and its query applies no per-employee restriction, so anyone holding crm sees the whole plan. The crm:oportunidadesnegocios:view:all and crm:marcacoes:view:all sub-privileges are not abilities here: they only decide the per-row can_view flag."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "Restrict the plan to a single employee (empreg.CodEmpr). Omit for every employee, which is what the legacy widget does until one is picked.",
            "example": "53",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of rows, applied after the three sources are merged and ordered.",
            "example": "50",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The activity plan, ordered by due_date ascending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "assistance",
                              "opportunity",
                              "appointment"
                            ],
                            "description": "Which of the three unioned sources the row came from. A stable slug, never translated text: the legacy widget renders a localized label for the same value."
                          },
                          "code": {
                            "type": "string",
                            "description": "Primary key of the underlying record, a STRING for every row kind -- the opportunity branch keys on a document number such as \"P034_2012_PC\", never an integer. Compose the navigation to the record with it: no URL travels in the response."
                          },
                          "designation": {
                            "type": "string",
                            "nullable": true,
                            "description": "Subject of the record, never translated."
                          },
                          "due_date": {
                            "type": "string",
                            "format": "date",
                            "nullable": true,
                            "description": "The row date, truncated to the day as the legacy oracle truncated it. For an opportunity this is the phase deadline and for an appointment the end date, both already in the past; for an assistance it is the last-changed timestamp and carries no deadline meaning. Null when the source holds an empty-date sentinel (0000-00-00), which occurs in real data."
                          },
                          "entity_code": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Entity code. Pair it with entity_type to build the link: the entity is NOT always a customer."
                          },
                          "entity_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "Entity name. Null when the code has no matching row."
                          },
                          "entity_type": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "C",
                              "F",
                              "P",
                              "R",
                              "E",
                              "T",
                              "Z"
                            ],
                            "description": "Raw tipoterc letter (C customer, F supplier, P prospect, R seller, E employee, T contact, Z common), the same value the CRM appointments endpoints serve for this column. Only the assistance branch is guaranteed to be a customer; the other two join the all-entities view, so a sizeable share of rows are not customers. Null when the row carries no entity -- an empty tipoterc and a missing one both collapse to null. Independent of can_view, which is about the RECORD, not the entity."
                          },
                          "employee_code": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Employee the record belongs to. Also the value accepted by the employee_id query parameter."
                          },
                          "employee_name": {
                            "type": "string",
                            "nullable": true,
                            "description": "Employee name. Null when the record has no employee assigned."
                          },
                          "status": {
                            "type": "string",
                            "nullable": true,
                            "description": "State description resolved from the matching state table of each source."
                          },
                          "can_view": {
                            "type": "boolean",
                            "description": "Whether the caller may open this record. False means render the row as plain text instead of a link. An assistance is always viewable; an opportunity or an appointment opens for its own employee or for a holder of the matching view:all sub-privilege."
                          }
                        },
                        "required": [
                          "type",
                          "code",
                          "designation",
                          "due_date",
                          "entity_code",
                          "entity_name",
                          "entity_type",
                          "employee_code",
                          "employee_name",
                          "status",
                          "can_view"
                        ]
                      },
                      "description": "Open assistances, business opportunities past their phase deadline and unfinished appointments past their end date, in one list ordered by due_date ascending. Empty when none -- never a 404."
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/status/rooms": {
      "get": {
        "summary": "Room status for a day",
        "description": "Private rooms and whether a booking covers each of them on the requested day, behind the \"Estado Quartos\" tab. Rooms with visible = F are excluded, as in the legacy listing. `occupied_previous_day` reports the same question for the day before, which is what the legacy widget uses to mark a room that has just been vacated.",
        "tags": [
          "Hotel",
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Hotel\\Status\\Policies\\HotelStatusPolicy",
          "ability": "viewRoomStatus",
          "privileges": [
            "hotel:esthotel"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget hotel/esthotel (dashboard.id=4), which gates on hotel:esthotel. A simple privilege, not a compound one: unlike the banks balances widget (bancos&relatorios:bancos:saldos) there is nothing to split on \"&\". The four abilities are kept distinct even though they resolve to the same privilege, because each is a distinct endpoint and one of them may need to be tightened later without breaking the contract of the other three."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Day to report on. Defaults to today, which is what the legacy widget shows when it opens.",
            "example": "2026-09-15",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RoomStatusOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/status/beds": {
      "get": {
        "summary": "Bed status for a day",
        "description": "Beds of the shared rooms and whether a booking covers each of them on the requested day, behind the \"Estado camas\" tab. A bed is identified by the pair (room_code, bed). When the tenant parameter HOT_UsaCama is off the legacy widget hides this tab entirely: the endpoint then answers with an empty list and meta.enabled = false, which is how a consumer tells \"no beds occupied\" from \"this hotel does not sell beds\".",
        "tags": [
          "Hotel",
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Hotel\\Status\\Policies\\HotelStatusPolicy",
          "ability": "viewBedStatus",
          "privileges": [
            "hotel:esthotel"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget hotel/esthotel (dashboard.id=4), which gates on hotel:esthotel. A simple privilege, not a compound one: unlike the banks balances widget (bancos&relatorios:bancos:saldos) there is nothing to split on \"&\". The four abilities are kept distinct even though they resolve to the same privilege, because each is a distinct endpoint and one of them may need to be tightened later without breaking the contract of the other three."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Day to report on. Defaults to today, which is what the legacy widget shows when it opens.",
            "example": "2026-09-15",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BedStatusOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/status/services": {
      "get": {
        "summary": "Booked services for a day",
        "description": "Services bought by the stays that cover the requested day, behind the \"Servicos\" tab. One row per (booking detail, service) pair, so the same stay appears once per service. Stays with no service are excluded, mirroring the legacy inner condition on the article.",
        "tags": [
          "Hotel",
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Hotel\\Status\\Policies\\HotelStatusPolicy",
          "ability": "viewServices",
          "privileges": [
            "hotel:esthotel"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget hotel/esthotel (dashboard.id=4), which gates on hotel:esthotel. A simple privilege, not a compound one: unlike the banks balances widget (bancos&relatorios:bancos:saldos) there is nothing to split on \"&\". The four abilities are kept distinct even though they resolve to the same privilege, because each is a distinct endpoint and one of them may need to be tightened later without breaking the contract of the other three."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Day to report on. Defaults to today, which is what the legacy widget shows when it opens.",
            "example": "2026-09-15",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceStatusOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/status/monthly-plan": {
      "get": {
        "summary": "Monthly occupancy plan",
        "description": "The room-by-day occupancy grid for one calendar month, behind the \"Plano Mensal\" tab. Addressed by (year, month) rather than a free range because the legacy tab always renders a whole month. Only the occupied days travel: the window is already given by from/to, so empty days are omitted instead of shipping roughly thirty empty objects per room.",
        "tags": [
          "Hotel",
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Hotel\\Status\\Policies\\HotelStatusPolicy",
          "ability": "viewMonthlyPlan",
          "privileges": [
            "hotel:esthotel"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget hotel/esthotel (dashboard.id=4), which gates on hotel:esthotel. A simple privilege, not a compound one: unlike the banks balances widget (bancos&relatorios:bancos:saldos) there is nothing to split on \"&\". The four abilities are kept distinct even though they resolve to the same privilege, because each is a distinct endpoint and one of them may need to be tightened later without breaking the contract of the other three."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Calendar year. Defaults to the current one.",
            "example": "2026",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Calendar month, 1-12. Defaults to the current one.",
            "example": "9",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The monthly plan, rooms ordered by type then room code.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "year": {
                      "type": "integer"
                    },
                    "month": {
                      "type": "integer"
                    },
                    "from": {
                      "type": "string",
                      "format": "date"
                    },
                    "to": {
                      "type": "string",
                      "format": "date"
                    },
                    "beds_enabled": {
                      "type": "boolean",
                      "description": "False when the tenant parameter HOT_UsaCama is off. An empty `beds` list means \"no beds occupied\" only when this is true; when false the hotel does not sell beds at all and the legacy widget hides the whole block."
                    },
                    "rooms": {
                      "type": "array",
                      "description": "One entry per private room, ordered by type then room code, as the oracle orders them.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "room_id": {
                            "type": "integer",
                            "nullable": true
                          },
                          "room_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "room_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "is_private": {
                            "type": "boolean"
                          },
                          "days": {
                            "type": "array",
                            "description": "ONLY the occupied days. The window is already given by `from`/`to`, so empty days are omitted rather than shipped as ~30 empty objects per room.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "booking_code": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "occupants": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "price": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "Nightly price of the booking row, NOT converted and NOT multiplied by the number of nights. Same value repeats on every day of the same stay."
                                },
                                "start_date": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                },
                                "end_date": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "beds": {
                      "type": "array",
                      "description": "One entry per (room, bed) of the shared rooms. Empty when `beds_enabled` is false.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "room_id": {
                            "type": "integer",
                            "nullable": true
                          },
                          "room_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "room_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "bed": {
                            "type": "string"
                          },
                          "days": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "booking_code": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "occupants": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "price": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "Nightly price of the booking row, NOT converted and NOT multiplied by the number of nights. Same value repeats on every day of the same stay."
                                },
                                "start_date": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                },
                                "end_date": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/status/conditions": {
      "get": {
        "summary": "Room conditions the tenant defines",
        "description": "The whole `hotel/apoio/estadoquarto` table, in the order the tenant put it in. The rooms endpoint only ever reports the conditions its rooms happen to hold, so a consumer offering a condition to pick -- which is a condition no room holds yet, by definition -- has to read them from here.",
        "tags": [
          "Hotel",
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Hotel\\Status\\Policies\\HotelStatusPolicy",
          "ability": "viewConditions",
          "privileges": [
            "hotel:esthotel"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget hotel/esthotel (dashboard.id=4), which gates on hotel:esthotel. A simple privilege, not a compound one: unlike the banks balances widget (bancos&relatorios:bancos:saldos) there is nothing to split on \"&\". The four abilities are kept distinct even though they resolve to the same privilege, because each is a distinct endpoint and one of them may need to be tightened later without breaking the contract of the other three."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RoomConditionOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/status/rooms/{id}": {
      "patch": {
        "summary": "Move a room to another condition",
        "description": "What the legacy board writes from its own room dialog. Besides the column it appends the history row the hotel reads -- who moved it, when, from which condition, to which, and the booking the room was under -- so the trail keeps being written. Beds are out of scope: they have their own tab and would need their own identifier.",
        "tags": [
          "Hotel",
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Hotel\\Status\\Policies\\HotelStatusPolicy",
          "ability": "setRoomCondition",
          "privileges": [
            "hotel:esthotel"
          ],
          "notes": "Moving a room to another condition is what the legacy board itself does from its own room dialog (_ajax/UPDATE_.php, updateEstadoHotel), and the board is gated on hotel:esthotel alone. Deliberately NOT hotel:apoio:quartos:edit: that privilege opens the room record for editing, which is a different and wider thing than a receptionist flagging a room as cleaned."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status_code": {
                    "type": "integer",
                    "description": "Row of the tenant condition table to move the room to, as GET /v2/hotel/status/conditions reports it in `code`. A code the tenant does not define answers 404, like an unknown room."
                  }
                },
                "required": [
                  "status_code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The room and the condition it now holds.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/status/booking-lines/{id}": {
      "patch": {
        "summary": "Rewrite the observation on a booking line",
        "description": "The note the reservation screen writes per room. Addressed by the line id the rooms endpoint reports in `occupancy.detail_id`, not by the booking: a stay can carry more than one line for the same room, and the note belongs to the line.",
        "tags": [
          "Hotel",
          "Status"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Hotel\\Status\\Policies\\HotelStatusPolicy",
          "ability": "setBookingNote",
          "privileges": [
            "hotel:reservas"
          ],
          "notes": "The observation belongs to the booking LINE, and the screen that writes it is the reservation (hotel/reservas, _views/hotel/reservas.php: ListaQuartos_obs), which gates on hotel:reservas. Reading the board is not enough to rewrite somebody booking."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notes": {
                    "type": "string",
                    "description": "The observation on this line of the booking. An empty string clears it; the field is long text, so nothing is truncated here."
                  }
                },
                "required": [
                  "notes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The line and the observation it now carries.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles": {
      "get": {
        "summary": "List articles",
        "description": "Returns articles with advanced filtering capabilities, paginated by cursor: follow meta.next to the last page.\n        Supports filtering by id, description, barcode, family, brand, stock quantities, prices, VAT, and more. Additional fields can be\n        requested via `additional_fields` parameter. Results are ordered by id unless a sort is given.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by article ID (code)",
            "example": "ART001",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by article description/name (supports operators: sw, ew, ct, eq)",
            "example": "Parafuso",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_type",
            "in": "query",
            "required": false,
            "description": "Filter by article type",
            "example": "product",
            "schema": {
              "type": "string",
              "enum": [
                "N",
                "S",
                "O"
              ]
            }
          },
          {
            "name": "cost_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "selling_price",
            "in": "query",
            "required": false,
            "description": "Filter by selling price (supports operators: gte, lte, eq)",
            "example": 25,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "vat_id",
            "in": "query",
            "required": false,
            "description": "Filter by VAT rate ID",
            "example": "IVA23",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "measurement_unit_id",
            "in": "query",
            "required": false,
            "description": "Filter by measurement unit code",
            "example": "UN",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stock_quantity",
            "in": "query",
            "required": false,
            "description": "Filter by current stock quantity (supports operators: gte, lte, eq)",
            "example": 100,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "family_id",
            "in": "query",
            "required": false,
            "description": "Filter by family ID",
            "example": "FAM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sub_family_id",
            "in": "query",
            "required": false,
            "description": "Filter by sub-family ID",
            "example": "SFAM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sub_sub_family_id",
            "in": "query",
            "required": false,
            "description": "Filter by sub-sub-family ID",
            "example": "SSFAM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "description": "Filter by barcode (supports operators: sw, ew, ct, eq)",
            "example": "123456789",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand_id",
            "in": "query",
            "required": false,
            "description": "Filter by brand ID",
            "example": "BRAND001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "spaces_dimensions",
            "in": "query",
            "required": false,
            "description": "Filter by spaces/dimensions type",
            "example": "A",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id_spaces_dimensions",
            "in": "query",
            "required": false,
            "description": "Filter by spaces/dimensions ID",
            "example": "DIM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vat_exemption_reason_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_set",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "part_number",
            "in": "query",
            "required": false,
            "description": "Filter by manufacturer part number (supports operators: sw, ew, ct, eq)",
            "example": "PN-12345",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Filter by active status",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "active_for_web",
            "in": "query",
            "required": false,
            "description": "Filter by web visibility status",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "manually_updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by last manual update date (supports operators: gte, lte, eq)",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update timestamp (supports operators: gte, lte, eq)",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation timestamp (supports operators: gte, lte, eq)",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "is_tire",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tire_load_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tire_speed_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A1",
                "A2",
                "A3",
                "A4",
                "A5",
                "A6",
                "A7",
                "A8",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G",
                "J",
                "K",
                "L",
                "M",
                "N",
                "P",
                "Q",
                "R",
                "S",
                "T",
                "H",
                "V",
                "W",
                "Y",
                "ZR"
              ]
            }
          },
          {
            "name": "tire_energy_efficiency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E"
              ]
            }
          },
          {
            "name": "tire_safety",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E"
              ]
            }
          },
          {
            "name": "tire_external_noise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C"
              ]
            }
          },
          {
            "name": "tire_decibels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_measure",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tire_width",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_height",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_diameter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_type_id",
            "in": "query",
            "required": false,
            "description": "Valid value from artigos_pneu_tipo.id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tire_season_id",
            "in": "query",
            "required": false,
            "description": "Valid value from artigos_pneu_temporada.id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tire_snow_certification",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tire_ice_certification",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "web_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "web_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "web_reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "long_description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "short_description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "additional_fields_all",
            "in": "query",
            "required": false,
            "description": "Include all available additional fields in response",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor taken from meta.next or meta.previous; omit it for the first page. A cursor that was changed, or that was issued for another sort, answers 422 INVALID_CURSOR. There are no page numbers: sending page answers 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "additional_fields",
            "in": "query",
            "required": false,
            "description": "Array of additional fields to include in response (e.g., idforweb, priceforweb, weight, dimensions)",
            "example": [
              "idforweb",
              "weight"
            ],
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[id][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cost_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[cost_price][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[selling_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[selling_price][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[stock_quantity][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[stock_quantity][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[barcode][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[barcode][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[part_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[part_number][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[manually_updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[manually_updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[tire_decibels][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_decibels][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[tire_width][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_width][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[tire_height][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_height][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[tire_diameter][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_diameter][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[web_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[web_id][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[web_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[web_price][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[web_reference][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[web_reference][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[long_description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[long_description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[short_description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[short_description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purchasing_price",
            "in": "query",
            "required": false,
            "description": "Filter by purchase price (supports operators: gte, lte, eq)",
            "example": 10.5,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "re",
            "in": "query",
            "required": false,
            "description": "Filter by exemption reason code (IVA)",
            "example": "M01",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "set",
            "in": "query",
            "required": false,
            "description": "Filter by set/conjunto code",
            "example": "SET001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object with field => operator => value",
            "example": {
              "description": {
                "ct": "parafuso"
              }
            },
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field (e.g., id, description, created_at)",
            "example": "id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort order (ASC or DESC)",
            "example": "DESC",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Field to sort by, prefixed with - for descending (e.g. -created_at). Ties are ordered by id in the same direction; without a sort the list is ordered by id.",
            "example": "-created_at",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "cursor",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create article",
        "description": "Creates a new article with the provided data. Required fields: id (article code), description, article_type, vat_id,\n        measurement_unit_id. Optional: initial stock quantity, warehouse_id for stock registration. Module-specific fields (OFICINAS, PRESTASYNC,\n        LOGISTICA, TPV, etc.) are available based on active modules.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "create",
          "privileges": [
            "stocks:artigos:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "Article name/description"
                  },
                  "article_type": {
                    "type": "string",
                    "description": "Article type (product, service, etc.)"
                  },
                  "vat_id": {
                    "type": "string",
                    "description": "VAT rate ID"
                  },
                  "measurement_unit_id": {
                    "type": "string",
                    "description": "Measurement unit code (e.g., UN, KG, LT)"
                  },
                  "cost_price": {
                    "type": "number"
                  },
                  "selling_price": {
                    "type": "number",
                    "description": "Selling price"
                  },
                  "selling_price_option": {
                    "type": "string",
                    "enum": [
                      "PRV",
                      "PCU"
                    ],
                    "description": "Selling price option"
                  },
                  "cost_price_margin": {
                    "type": "number"
                  },
                  "cost_price_margin_type": {
                    "type": "string",
                    "enum": [
                      "P",
                      "V"
                    ]
                  },
                  "family_id": {
                    "type": "string",
                    "description": "Family/article group ID"
                  },
                  "sub_family_id": {
                    "type": "string",
                    "description": "Sub-family ID"
                  },
                  "sub_sub_family_id": {
                    "type": "string",
                    "description": "Sub-sub-family ID"
                  },
                  "barcode": {
                    "type": "string",
                    "description": "Main barcode"
                  },
                  "brand_id": {
                    "type": "string",
                    "description": "Brand ID"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether article is active"
                  },
                  "active_for_web": {
                    "type": "boolean",
                    "description": "Whether article is visible on web"
                  },
                  "part_number": {
                    "type": "string",
                    "description": "Manufacturer part number"
                  },
                  "abbreviation": {
                    "type": "string",
                    "description": "Short name/abbreviation"
                  },
                  "location": {
                    "type": "string",
                    "description": "Storage location"
                  },
                  "discount": {
                    "type": "number",
                    "description": "Default discount percentage"
                  },
                  "energy_classification": {
                    "type": "string"
                  },
                  "minimum_stock": {
                    "type": "number"
                  },
                  "maximum_stock": {
                    "type": "number"
                  },
                  "customs_duty_rate": {
                    "type": "number",
                    "description": "Customs duty percentage"
                  },
                  "commission_rate": {
                    "type": "number",
                    "description": "Commission rate"
                  },
                  "discount_classification": {
                    "type": "string",
                    "description": "Valid value from descontos_classif.codclassif,."
                  },
                  "use_lots": {
                    "type": "boolean",
                    "description": "Uses lot tracking"
                  },
                  "use_serial_numbers": {
                    "type": "boolean",
                    "description": "Uses serial number tracking"
                  },
                  "manufactured": {
                    "type": "boolean",
                    "description": "Is manufactured in-house"
                  },
                  "withholding_tax": {
                    "type": "boolean",
                    "description": "Subject to withholding tax"
                  },
                  "quantity_per_vehicle": {
                    "type": "number"
                  },
                  "quantity_per_pallet": {
                    "type": "number"
                  },
                  "quantity_per_box": {
                    "type": "number"
                  },
                  "saft_product_type": {
                    "type": "string",
                    "description": "SAF-T product type"
                  },
                  "saft_product_category": {
                    "type": "string",
                    "description": "SAF-T product category"
                  },
                  "is_component": {
                    "type": "boolean",
                    "description": "Is a component"
                  },
                  "component_brand": {
                    "type": "string",
                    "description": "Component brand"
                  },
                  "component_model": {
                    "type": "string",
                    "description": "Component model"
                  },
                  "component_version": {
                    "type": "string",
                    "description": "Component version"
                  },
                  "is_tire": {
                    "type": "boolean"
                  },
                  "tire_load_index": {
                    "type": "string"
                  },
                  "tire_speed_index": {
                    "type": "string",
                    "enum": [
                      "A1",
                      "A2",
                      "A3",
                      "A4",
                      "A5",
                      "A6",
                      "A7",
                      "A8",
                      "B",
                      "C",
                      "D",
                      "E",
                      "F",
                      "G",
                      "J",
                      "K",
                      "L",
                      "M",
                      "N",
                      "P",
                      "Q",
                      "R",
                      "S",
                      "T",
                      "H",
                      "V",
                      "W",
                      "Y",
                      "ZR"
                    ]
                  },
                  "tire_energy_efficiency": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B",
                      "C",
                      "D",
                      "E"
                    ]
                  },
                  "tire_safety": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B",
                      "C",
                      "D",
                      "E"
                    ]
                  },
                  "tire_external_noise": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B",
                      "C"
                    ]
                  },
                  "tire_decibels": {
                    "type": "number"
                  },
                  "tire_measure": {
                    "type": "string"
                  },
                  "tire_width": {
                    "type": "integer"
                  },
                  "tire_height": {
                    "type": "integer"
                  },
                  "tire_diameter": {
                    "type": "integer"
                  },
                  "tire_type_id": {
                    "type": "integer",
                    "description": "Valid value from artigos_pneu_tipo.id."
                  },
                  "tire_season_id": {
                    "type": "integer",
                    "description": "Valid value from artigos_pneu_temporada.id."
                  },
                  "tire_snow_certification": {
                    "type": "boolean"
                  },
                  "tire_ice_certification": {
                    "type": "boolean"
                  },
                  "web_id": {
                    "type": "string"
                  },
                  "web_price": {
                    "type": "number"
                  },
                  "web_reference": {
                    "type": "string"
                  },
                  "long_description": {
                    "type": "string"
                  },
                  "short_description": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "logistics_type": {
                    "type": "string"
                  },
                  "logistics_quantity": {
                    "type": "number"
                  },
                  "width": {
                    "type": "number"
                  },
                  "height": {
                    "type": "number"
                  },
                  "depth": {
                    "type": "number"
                  },
                  "active_for_pos": {
                    "type": "boolean"
                  },
                  "drive360_autoorder": {
                    "type": "boolean"
                  },
                  "alternative_measurement_unit_id": {
                    "type": "string"
                  },
                  "alternative_measurement_unit_conversion": {
                    "type": "number"
                  },
                  "ams_active": {
                    "type": "boolean"
                  },
                  "fuel_type_id": {
                    "type": "string",
                    "description": "Valid value from tipos_combustiveis.id,."
                  },
                  "operation_type": {
                    "type": "string",
                    "description": "Valid value from tipologia_operacao.code,."
                  },
                  "statistical_classification": {
                    "type": "string"
                  },
                  "tecdoc_code": {
                    "type": "string"
                  },
                  "tecdoc_supplier": {
                    "type": "string"
                  },
                  "id_code_mr": {
                    "type": "string"
                  },
                  "price1": {
                    "type": "number"
                  },
                  "block1": {
                    "type": "boolean"
                  },
                  "price2": {
                    "type": "number"
                  },
                  "block2": {
                    "type": "boolean"
                  },
                  "price3": {
                    "type": "number"
                  },
                  "block3": {
                    "type": "boolean"
                  },
                  "price4": {
                    "type": "number"
                  },
                  "block4": {
                    "type": "boolean"
                  },
                  "price5": {
                    "type": "number"
                  },
                  "block5": {
                    "type": "boolean"
                  },
                  "price6": {
                    "type": "number"
                  },
                  "block6": {
                    "type": "boolean"
                  },
                  "price7": {
                    "type": "number"
                  },
                  "block7": {
                    "type": "boolean"
                  },
                  "price8": {
                    "type": "number"
                  },
                  "block8": {
                    "type": "boolean"
                  },
                  "price9": {
                    "type": "number"
                  },
                  "block9": {
                    "type": "boolean"
                  },
                  "price10": {
                    "type": "number"
                  },
                  "block10": {
                    "type": "boolean"
                  },
                  "price11": {
                    "type": "number"
                  },
                  "block11": {
                    "type": "boolean"
                  },
                  "price12": {
                    "type": "number"
                  },
                  "block12": {
                    "type": "boolean"
                  },
                  "price13": {
                    "type": "number"
                  },
                  "block13": {
                    "type": "boolean"
                  },
                  "price14": {
                    "type": "number"
                  },
                  "block14": {
                    "type": "boolean"
                  },
                  "price15": {
                    "type": "number"
                  },
                  "block15": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string",
                    "description": "Article code/identifier (unique)"
                  },
                  "quantity": {
                    "type": "number",
                    "description": "Initial stock quantity to register"
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "description": "Warehouse ID for initial stock registration"
                  },
                  "purchasing_price": {
                    "type": "number",
                    "description": "Cost/purchase price"
                  },
                  "margin_pcu": {
                    "type": "number",
                    "description": "Unit cost margin"
                  },
                  "margin_pcu_type": {
                    "type": "string",
                    "description": "Margin type (value or percentage)"
                  },
                  "energy_class": {
                    "type": "string",
                    "description": "Energy efficiency class"
                  },
                  "stock_min": {
                    "type": "number",
                    "description": "Minimum stock level"
                  },
                  "stock_max": {
                    "type": "number",
                    "description": "Maximum stock level"
                  },
                  "discount_classif": {
                    "type": "string",
                    "description": "Discount classification"
                  },
                  "qty_vehicle": {
                    "type": "number",
                    "description": "Quantity per vehicle"
                  },
                  "qty_pallet": {
                    "type": "number",
                    "description": "Quantity per pallet"
                  },
                  "qty_box": {
                    "type": "number",
                    "description": "Quantity per box"
                  }
                },
                "required": [
                  "description",
                  "article_type",
                  "vat_id",
                  "measurement_unit_id",
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Article created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticleOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/bulk/create": {
      "post": {
        "summary": "Create articles in bulk",
        "description": "Creates multiple articles in a single request. Accepts an array of article data objects. Validates each article according to\n        CreateArticleRequest rules. Returns results for each article indicating success or failure with error details.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "articles": {
                    "type": "array",
                    "items": {
                      "type": "array"
                    },
                    "description": "Array of article objects to create. Each object follows CreateArticleRequest fields."
                  }
                },
                "required": [
                  "articles"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk creation results",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/bulk/update": {
      "post": {
        "summary": "Update articles in bulk",
        "description": "Updates multiple articles in a single request. Each object must contain the article id (code) and the fields to update.\n        Validates each update according to UpdateArticleRequest rules. Returns results for each article indicating success or failure with error\n        details.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "articles": {
                    "type": "array",
                    "items": {
                      "type": "array"
                    },
                    "description": "Array of article objects to update. Each object must contain id (article code) and the fields to update."
                  }
                },
                "required": [
                  "articles"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk update results",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/photo": {
      "post": {
        "summary": "Store article photo",
        "description": "Uploads a Base64 encoded image (JPEG, PNG or WebP) for the article. The file is stored under _uploads/{tenant}/{company}/artigos/\n        and overwrites any previous photo.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "update",
          "privileges": [
            "stocks:artigos:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "description": "Base64-encoded image (JPEG/PNG/WebP). May include the data URI prefix.",
                    "example": "/9j/4AAQSkZJRgABAQEA..."
                  },
                  "url_safe": {
                    "type": "boolean",
                    "description": "When true, replaces URL-safe Base64 characters (-_) with standard ones (+/) before decoding.",
                    "example": false
                  }
                },
                "required": [
                  "image"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Photo stored successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticlePhotoOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/lots": {
      "get": {
        "summary": "List article lots",
        "description": "Returns lots associated with an article. Supports filtering by lot id, description, entry and expiration dates, and warehouse context.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by lot id using operators eq/like",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by lot description using operators eq/like",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entry_date",
            "in": "query",
            "required": false,
            "description": "Filter by lot entry date using operators gte/lte",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "expiration_date",
            "in": "query",
            "required": false,
            "description": "Filter by lot expiration date using operators gte/lte",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation timestamp using operators gte/lte",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update timestamp using operators gte/lte",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[entry_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[entry_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[expiration_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[expiration_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort order (ASC or DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleLotDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/OffsetPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "offset",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create article lot",
        "description": "Creates a new lot for the selected article and initializes stock records for the selected warehouse.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "create",
          "privileges": [
            "stocks:artigos:new"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 3,
                    "description": "Lot identifier"
                  },
                  "description": {
                    "type": "string",
                    "minLength": 3,
                    "description": "Lot description"
                  },
                  "entry_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Lot entry date (Y-m-d)"
                  },
                  "expiration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Lot expiration date (Y-m-d)"
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "description": "Warehouse id where the lot will be initialized"
                  }
                },
                "required": [
                  "id",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Article lot created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticleLotDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Article lot could not be created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/complementaries": {
      "get": {
        "summary": "List article complementary articles",
        "description": "Returns complementary articles associated with this article. Complementary articles are suggested items often sold together or\n        related to the main article (cross-selling suggestions).",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "complementaries",
          "privileges": [
            "stocks:artigos:tab:artcomplementar"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "complementary_id",
            "in": "query",
            "required": false,
            "description": "Filter by complementary article ID (supports operators: eq, like)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[complementary_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like. Example: filter[complementary_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object with field => operator => value",
            "example": {
              "complementary_id": {
                "like": "ART"
              }
            },
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of complementary articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleComplementaryDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/OffsetPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "offset",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create article complementary relation",
        "description": "Creates a complementary article relation for the given article. A complementary article is a product suggested together with the\n        parent article. Persists the relation in TABLE_ARTCOMPLOBRIG with auto-generated NLinha.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "complementaries",
          "privileges": [
            "stocks:artigos:tab:artcomplementar"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "complementary_id": {
                    "type": "string",
                    "description": "Complementary article identifier"
                  },
                  "quantity": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Quantity required (default 0)"
                  },
                  "required": {
                    "type": "boolean",
                    "description": "Whether the complementary is mandatory"
                  },
                  "complementary_price": {
                    "type": "number",
                    "description": "Complementary article price override"
                  },
                  "extra_description": {
                    "type": "string",
                    "maxLength": 127,
                    "description": "Additional description for the relation"
                  },
                  "multiple_quantity": {
                    "type": "boolean",
                    "description": "Whether the quantity is multiplied with the parent article quantity"
                  }
                },
                "required": [
                  "complementary_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Complementary relation created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticleComplementaryDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Complementary relation could not be created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/kits": {
      "get": {
        "summary": "List article kits",
        "description": "Returns the components of this kit (kits de venda). A kit is a predefined combination of articles sold as a single\n        unit. Shows each component line, quantity, unit, pricing, and whether serial numbers or lots are used.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "kits",
          "privileges": [
            "stocks:artigos:tab:kits"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter by kit article ID (supports operators: eq, like, sw, ew)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_b64_id",
            "in": "query",
            "required": false,
            "description": "Filter by kit article ID (base64 encoded)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by kit description (supports operators: eq, like, sw, ew)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "required": false,
            "description": "Filter by quantity (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "selling_price",
            "in": "query",
            "required": false,
            "description": "Filter by selling price (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cost_price",
            "in": "query",
            "required": false,
            "description": "Filter by cost price (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cost_price_medium",
            "in": "query",
            "required": false,
            "description": "Filter by medium cost price (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "use_serial_numbers",
            "in": "query",
            "required": false,
            "description": "Filter by serial number usage",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "use_lots",
            "in": "query",
            "required": false,
            "description": "Filter by lot usage",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[article_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[article_b64_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[article_b64_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[quantity][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[quantity][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[selling_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[selling_price][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[cost_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[cost_price][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[cost_price_medium][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[cost_price_medium][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object with field => operator => value",
            "example": {
              "quantity": {
                "gte": 2
              },
              "selling_price": {
                "lte": 100
              }
            },
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of kits containing this article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleKitDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/OffsetPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "offset",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add a component to the kit",
        "description": "Adds a component line to the kit. The line number is the next free line of the kit; the unit defaults to the component\n        measurement unit. Rejects a component that does not exist, is the kit itself or is already in the kit.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "kits",
          "privileges": [
            "stocks:artigos:tab:kits"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "article_id": {
                    "type": "string",
                    "description": "Component article code. Must exist, differ from the kit and not be a component of the kit yet.",
                    "example": "ART001"
                  },
                  "quantity": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Component quantity per kit unit. Must be greater than 0.",
                    "example": 2
                  },
                  "unit": {
                    "type": "string",
                    "description": "Measurement unit code. Defaults to the component measurement unit.",
                    "example": "UN"
                  }
                },
                "required": [
                  "article_id",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Component line created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Invalid component",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/kits/compose": {
      "post": {
        "summary": "Compose kit units",
        "description": "Composes kit units from its components: one stock exit (SR) per component warehouse and one stock entry of the kit with\n        the movement type set in STOCK_TipoMovEntradaComporKit (ERC by default). The kit is valued at the sum of quantity x average cost of\n        its components. All movements are created in one transaction.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "kits",
          "privileges": [
            "stocks:artigos:tab:kits"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quantity": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Kit units to compose. Must be greater than 0.",
                    "example": 2
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "description": "Warehouse that receives the composed kits.",
                    "example": 1
                  },
                  "lot": {
                    "type": "string",
                    "description": "Kit lot. Required when the kit uses lots; the lot must exist.",
                    "example": "L2026"
                  },
                  "serial_numbers": {
                    "type": "array",
                    "description": "Kit serial numbers. Required when the kit uses serial numbers, exactly `quantity` values not in stock yet.",
                    "example": [
                      "K-001",
                      "K-002"
                    ]
                  },
                  "components": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "article_id": {
                          "type": "string",
                          "description": "Component article code.",
                          "example": "ART001"
                        },
                        "warehouse_id": {
                          "type": "integer",
                          "description": "Warehouse the component leaves from.",
                          "example": 1
                        },
                        "lot": {
                          "type": "string",
                          "description": "Component lot with stock in that warehouse. Required when the component uses lots.",
                          "example": "LC7"
                        },
                        "serial_numbers": {
                          "type": "array",
                          "description": "Component serial numbers in that warehouse. Required for serial components, `quantity` x quantity per kit.",
                          "example": [
                            "S1",
                            "S2"
                          ]
                        }
                      },
                      "required": [
                        "article_id",
                        "warehouse_id"
                      ]
                    },
                    "description": "One entry per kit component, covering every component of the kit."
                  },
                  "components.*.article_id": {
                    "type": "string",
                    "description": "Component article code.",
                    "example": "ART001"
                  },
                  "components.*.warehouse_id": {
                    "type": "integer",
                    "description": "Warehouse the component leaves from.",
                    "example": 1
                  },
                  "components.*.lot": {
                    "type": "string",
                    "description": "Component lot with stock in that warehouse. Required when the component uses lots.",
                    "example": "LC7"
                  },
                  "components.*.serial_numbers": {
                    "type": "array",
                    "description": "Component serial numbers in that warehouse. Required for serial components, `quantity` x quantity per kit.",
                    "example": [
                      "S1",
                      "S2"
                    ]
                  }
                },
                "required": [
                  "quantity",
                  "warehouse_id",
                  "components",
                  "components.*.article_id",
                  "components.*.warehouse_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Movements created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Invalid quantity, warehouse, lot, serial numbers or stock",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/kits/decompose": {
      "post": {
        "summary": "Decompose kit units",
        "description": "Decomposes kit units into its components: one stock exit (SR) of the kit and one stock entry per component warehouse\n        with the movement type set in STOCK_TipoMovEntradaDecomporKit (ER by default). All movements are created in one transaction.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "kits",
          "privileges": [
            "stocks:artigos:tab:kits"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quantity": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Kit units to decompose. Must be greater than 0 and not above the kit stock in the warehouse.",
                    "example": 1
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "description": "Warehouse the kits leave from.",
                    "example": 1
                  },
                  "lot": {
                    "type": "string",
                    "description": "Kit lot with stock in that warehouse. Required when the kit uses lots.",
                    "example": "L2026"
                  },
                  "serial_numbers": {
                    "type": "array",
                    "description": "Kit serial numbers in stock in that warehouse. Required for kits with serial numbers, `quantity` values.",
                    "example": [
                      "K-001"
                    ]
                  },
                  "components": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "article_id": {
                          "type": "string",
                          "description": "Component article code.",
                          "example": "ART001"
                        },
                        "warehouse_id": {
                          "type": "integer",
                          "description": "Warehouse that receives the component.",
                          "example": 1
                        },
                        "lot": {
                          "type": "string",
                          "description": "Existing component lot. Required when the component uses lots.",
                          "example": "LC7"
                        },
                        "serial_numbers": {
                          "type": "array",
                          "description": "Component serial numbers not in stock yet. Required for serial components, `quantity` x component quantity.",
                          "example": [
                            "S1",
                            "S2"
                          ]
                        }
                      },
                      "required": [
                        "article_id",
                        "warehouse_id"
                      ]
                    },
                    "description": "One entry per kit component, covering every component of the kit."
                  },
                  "components.*.article_id": {
                    "type": "string",
                    "description": "Component article code.",
                    "example": "ART001"
                  },
                  "components.*.warehouse_id": {
                    "type": "integer",
                    "description": "Warehouse that receives the component.",
                    "example": 1
                  },
                  "components.*.lot": {
                    "type": "string",
                    "description": "Existing component lot. Required when the component uses lots.",
                    "example": "LC7"
                  },
                  "components.*.serial_numbers": {
                    "type": "array",
                    "description": "Component serial numbers not in stock yet. Required for serial components, `quantity` x component quantity.",
                    "example": [
                      "S1",
                      "S2"
                    ]
                  }
                },
                "required": [
                  "quantity",
                  "warehouse_id",
                  "components",
                  "components.*.article_id",
                  "components.*.warehouse_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Movements created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Invalid quantity, warehouse, lot, serial numbers or stock",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/search": {
      "get": {
        "summary": "Search articles",
        "description": "Unified search for articles covering the legacy search_articles and search/articles endpoints. Supports Base64 encoded text/barcode\n        search, SETORES location enrichment, barcode prefix resolution, article image URL and aggregated barcodes.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "description": "Base64 encoded barcode lookup (also searches artigos_barcodes).",
            "example": "NTYwMTIzNDU2Nzg5MA==",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "use_lots",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "family_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "sub_family_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "txt",
            "in": "query",
            "required": false,
            "description": "Base64 encoded text to search in code/description/barcode.",
            "example": "QVJUMDAx",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Restrict sector lookup to this warehouse. Requires with_location=true.",
            "example": 1,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sector_id",
            "in": "query",
            "required": false,
            "description": "Restrict sector lookup to this sector id. Requires with_location=true.",
            "example": 12,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "with_location",
            "in": "query",
            "required": false,
            "description": "Include sector_id, sector_description, sector_barcode when SETORES module is active.",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "with_prefix",
            "in": "query",
            "required": false,
            "description": "Include barcode_prefix and resolved prefix_search/prefix_value/prefix_type when barcode filter is used.",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "with_image",
            "in": "query",
            "required": false,
            "description": "Include image_url when the article has a stored photo.",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "with_extra_barcodes",
            "in": "query",
            "required": false,
            "description": "Include the barcodes[] aggregated list (includes artigos_barcodes entries).",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[barcode][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[barcode][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[article_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[article_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[active][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by active flag. Operators: eq, neq. Example: filter[active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[use_lots][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[use_lots][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[family_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by family code. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[family_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[sub_family_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[sub_family_id][eq]=value",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleSearchOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/kits": {
      "get": {
        "summary": "List kit master articles",
        "description": "Returns a paginated list of articles that are kits. A kit master is any article that exists as a parent in the article kit table\n        (TABLE_ART_KIT). Supports the same filtering capabilities as the main articles listing.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by article ID (code)",
            "example": "ART001",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by article description/name (supports operators: sw, ew, ct, eq)",
            "example": "Parafuso",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_type",
            "in": "query",
            "required": false,
            "description": "Filter by article type",
            "example": "product",
            "schema": {
              "type": "string",
              "enum": [
                "N",
                "S",
                "O"
              ]
            }
          },
          {
            "name": "cost_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "selling_price",
            "in": "query",
            "required": false,
            "description": "Filter by selling price (supports operators: gte, lte, eq)",
            "example": 25,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "vat_id",
            "in": "query",
            "required": false,
            "description": "Filter by VAT rate ID",
            "example": "IVA23",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "measurement_unit_id",
            "in": "query",
            "required": false,
            "description": "Filter by measurement unit code",
            "example": "UN",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stock_quantity",
            "in": "query",
            "required": false,
            "description": "Filter by current stock quantity (supports operators: gte, lte, eq)",
            "example": 100,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "family_id",
            "in": "query",
            "required": false,
            "description": "Filter by family ID",
            "example": "FAM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sub_family_id",
            "in": "query",
            "required": false,
            "description": "Filter by sub-family ID",
            "example": "SFAM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sub_sub_family_id",
            "in": "query",
            "required": false,
            "description": "Filter by sub-sub-family ID",
            "example": "SSFAM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "description": "Filter by barcode (supports operators: sw, ew, ct, eq)",
            "example": "123456789",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand_id",
            "in": "query",
            "required": false,
            "description": "Filter by brand ID",
            "example": "BRAND001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "spaces_dimensions",
            "in": "query",
            "required": false,
            "description": "Filter by spaces/dimensions type",
            "example": "A",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id_spaces_dimensions",
            "in": "query",
            "required": false,
            "description": "Filter by spaces/dimensions ID",
            "example": "DIM001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vat_exemption_reason_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_set",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "part_number",
            "in": "query",
            "required": false,
            "description": "Filter by manufacturer part number (supports operators: sw, ew, ct, eq)",
            "example": "PN-12345",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Filter by active status",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "active_for_web",
            "in": "query",
            "required": false,
            "description": "Filter by web visibility status",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "manually_updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by last manual update date (supports operators: gte, lte, eq)",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update timestamp (supports operators: gte, lte, eq)",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation timestamp (supports operators: gte, lte, eq)",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "is_tire",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tire_load_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tire_speed_index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A1",
                "A2",
                "A3",
                "A4",
                "A5",
                "A6",
                "A7",
                "A8",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G",
                "J",
                "K",
                "L",
                "M",
                "N",
                "P",
                "Q",
                "R",
                "S",
                "T",
                "H",
                "V",
                "W",
                "Y",
                "ZR"
              ]
            }
          },
          {
            "name": "tire_energy_efficiency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E"
              ]
            }
          },
          {
            "name": "tire_safety",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "E"
              ]
            }
          },
          {
            "name": "tire_external_noise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C"
              ]
            }
          },
          {
            "name": "tire_decibels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_measure",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tire_width",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_height",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_diameter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "tire_type_id",
            "in": "query",
            "required": false,
            "description": "Valid value from artigos_pneu_tipo.id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tire_season_id",
            "in": "query",
            "required": false,
            "description": "Valid value from artigos_pneu_temporada.id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tire_snow_certification",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "tire_ice_certification",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "web_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "web_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "web_reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "long_description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "short_description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "additional_fields_all",
            "in": "query",
            "required": false,
            "description": "Include all available additional fields in response",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "additional_fields",
            "in": "query",
            "required": false,
            "description": "Array of additional fields to include in response (e.g., idforweb, priceforweb, weight, dimensions)",
            "example": [
              "idforweb",
              "weight"
            ],
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[id][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cost_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[cost_price][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[selling_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[selling_price][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[stock_quantity][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[stock_quantity][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[barcode][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[barcode][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[part_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[part_number][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[manually_updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[manually_updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[tire_decibels][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_decibels][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[tire_width][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_width][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[tire_height][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_height][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[tire_diameter][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[tire_diameter][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[web_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[web_id][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[web_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[web_price][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[web_reference][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[web_reference][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[long_description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[long_description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[short_description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[short_description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purchasing_price",
            "in": "query",
            "required": false,
            "description": "Filter by purchase price (supports operators: gte, lte, eq)",
            "example": 10.5,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "re",
            "in": "query",
            "required": false,
            "description": "Filter by exemption reason code (IVA)",
            "example": "M01",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "set",
            "in": "query",
            "required": false,
            "description": "Filter by set/conjunto code",
            "example": "SET001",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object with field => operator => value",
            "example": {
              "description": {
                "ct": "parafuso"
              }
            },
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field (e.g., id, description, created_at)",
            "example": "id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort order (ASC or DESC)",
            "example": "DESC",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Alternative sort field",
            "example": "description",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/OffsetPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "offset",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/prices-table": {
      "get": {
        "summary": "List article price table entries",
        "description": "Returns article price table entries with optional filtering by articles, classifications, and creation/update date ranges.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePriceTablePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos:tab:tprecos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "articles",
            "in": "query",
            "required": false,
            "description": "Filter by article IDs",
            "example": [
              "ART001",
              "ART002"
            ],
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "classifications",
            "in": "query",
            "required": false,
            "description": "Filter by classification codes",
            "example": [
              "CL01",
              "CL02"
            ],
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date (single day: Y-m-d)",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date (single day: Y-m-d)",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "created_at.from",
            "in": "query",
            "required": false,
            "description": "Creation date start (Y-m-d H:i:s)",
            "example": "2026-01-01 00:00:00",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "created_at.to",
            "in": "query",
            "required": false,
            "description": "Creation date end (Y-m-d H:i:s)",
            "example": "2026-01-31 23:59:59",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at.from",
            "in": "query",
            "required": false,
            "description": "Update date start (Y-m-d H:i:s)",
            "example": "2026-01-01 00:00:00",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at.to",
            "in": "query",
            "required": false,
            "description": "Update date end (Y-m-d H:i:s)",
            "example": "2026-01-31 23:59:59",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticlePriceTable"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}": {
      "get": {
        "summary": "Get article",
        "description": "Returns a single article by its identifier (id or base64-encoded id). Includes all available fields based on active modules\n        (PRESTASYNC, LOGISTICA, OFICINAS, TPV, etc.) and additional_fields parameter.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticleOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Article not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "data": {
                    "code": "ARTICLE_NOT_FOUND",
                    "message": "O recurso solicitado não foi encontrado."
                  },
                  "meta": {
                    "trace_id": "9f86d081884c7d659a2feaa0c55ad015"
                  }
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update article",
        "description": "Updates an existing article with new data. Supports partial updates - only provided fields will be updated. Module-specific\n        fields (OFICINAS, PRESTASYNC, LOGISTICA, TPV, etc.) are available based on active modules. Returns 204 No Content on success.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "update",
          "privileges": [
            "stocks:artigos:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "Article name/description"
                  },
                  "article_type": {
                    "type": "string",
                    "enum": [
                      "N",
                      "S",
                      "O"
                    ],
                    "description": "Article type (product, service, etc.)"
                  },
                  "vat_id": {
                    "type": "string",
                    "description": "VAT rate ID"
                  },
                  "measurement_unit_id": {
                    "type": "string",
                    "description": "Measurement unit code (e.g., UN, KG, LT)"
                  },
                  "cost_price": {
                    "type": "number"
                  },
                  "selling_price": {
                    "type": "number",
                    "description": "Selling price"
                  },
                  "selling_price_option": {
                    "type": "string",
                    "enum": [
                      "PRV",
                      "PCU"
                    ],
                    "description": "Selling price option"
                  },
                  "cost_price_margin": {
                    "type": "number"
                  },
                  "cost_price_margin_type": {
                    "type": "string",
                    "enum": [
                      "P",
                      "V"
                    ]
                  },
                  "family_id": {
                    "type": "string",
                    "description": "Family/article group ID"
                  },
                  "sub_family_id": {
                    "type": "string",
                    "description": "Sub-family ID"
                  },
                  "sub_sub_family_id": {
                    "type": "string",
                    "description": "Sub-sub-family ID"
                  },
                  "barcode": {
                    "type": "string",
                    "description": "Main barcode"
                  },
                  "brand_id": {
                    "type": "string",
                    "description": "Brand ID"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether article is active"
                  },
                  "active_for_web": {
                    "type": "boolean",
                    "description": "Whether article is visible on web"
                  },
                  "part_number": {
                    "type": "string",
                    "description": "Manufacturer part number"
                  },
                  "abbreviation": {
                    "type": "string",
                    "description": "Short name/abbreviation"
                  },
                  "location": {
                    "type": "string",
                    "description": "Storage location"
                  },
                  "discount": {
                    "type": "number",
                    "description": "Default discount percentage"
                  },
                  "energy_classification": {
                    "type": "string"
                  },
                  "minimum_stock": {
                    "type": "number"
                  },
                  "maximum_stock": {
                    "type": "number"
                  },
                  "customs_duty_rate": {
                    "type": "number",
                    "description": "Customs duty percentage"
                  },
                  "commission_rate": {
                    "type": "number",
                    "description": "Commission rate"
                  },
                  "discount_classification": {
                    "type": "string",
                    "description": "Valid value from descontos_classif.codclassif,."
                  },
                  "use_lots": {
                    "type": "boolean",
                    "description": "Uses lot tracking"
                  },
                  "use_serial_numbers": {
                    "type": "boolean",
                    "description": "Uses serial number tracking"
                  },
                  "manufactured": {
                    "type": "boolean",
                    "description": "Is manufactured in-house"
                  },
                  "withholding_tax": {
                    "type": "boolean",
                    "description": "Subject to withholding tax"
                  },
                  "quantity_per_vehicle": {
                    "type": "number"
                  },
                  "quantity_per_pallet": {
                    "type": "number"
                  },
                  "quantity_per_box": {
                    "type": "number"
                  },
                  "saft_product_type": {
                    "type": "string",
                    "description": "SAF-T product type"
                  },
                  "saft_product_category": {
                    "type": "string",
                    "description": "SAF-T product category"
                  },
                  "is_component": {
                    "type": "boolean",
                    "description": "Is a component"
                  },
                  "component_brand": {
                    "type": "string",
                    "description": "Component brand"
                  },
                  "component_model": {
                    "type": "string",
                    "description": "Component model"
                  },
                  "component_version": {
                    "type": "string",
                    "description": "Component version"
                  },
                  "is_tire": {
                    "type": "boolean"
                  },
                  "tire_load_index": {
                    "type": "string"
                  },
                  "tire_speed_index": {
                    "type": "string",
                    "enum": [
                      "A1",
                      "A2",
                      "A3",
                      "A4",
                      "A5",
                      "A6",
                      "A7",
                      "A8",
                      "B",
                      "C",
                      "D",
                      "E",
                      "F",
                      "G",
                      "J",
                      "K",
                      "L",
                      "M",
                      "N",
                      "P",
                      "Q",
                      "R",
                      "S",
                      "T",
                      "H",
                      "V",
                      "W",
                      "Y",
                      "ZR"
                    ]
                  },
                  "tire_energy_efficiency": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B",
                      "C",
                      "D",
                      "E"
                    ]
                  },
                  "tire_safety": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B",
                      "C",
                      "D",
                      "E"
                    ]
                  },
                  "tire_external_noise": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B",
                      "C"
                    ]
                  },
                  "tire_decibels": {
                    "type": "number"
                  },
                  "tire_measure": {
                    "type": "string"
                  },
                  "tire_width": {
                    "type": "integer"
                  },
                  "tire_height": {
                    "type": "integer"
                  },
                  "tire_diameter": {
                    "type": "integer"
                  },
                  "tire_type_id": {
                    "type": "integer",
                    "description": "Valid value from artigos_pneu_tipo.id."
                  },
                  "tire_season_id": {
                    "type": "integer",
                    "description": "Valid value from artigos_pneu_temporada.id."
                  },
                  "tire_snow_certification": {
                    "type": "boolean"
                  },
                  "tire_ice_certification": {
                    "type": "boolean"
                  },
                  "web_id": {
                    "type": "string"
                  },
                  "web_price": {
                    "type": "number"
                  },
                  "web_reference": {
                    "type": "string"
                  },
                  "long_description": {
                    "type": "string"
                  },
                  "short_description": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number"
                  },
                  "logistics_type": {
                    "type": "string"
                  },
                  "logistics_quantity": {
                    "type": "number"
                  },
                  "width": {
                    "type": "number"
                  },
                  "height": {
                    "type": "number"
                  },
                  "depth": {
                    "type": "number"
                  },
                  "active_for_pos": {
                    "type": "boolean"
                  },
                  "drive360_autoorder": {
                    "type": "boolean"
                  },
                  "alternative_measurement_unit_id": {
                    "type": "string"
                  },
                  "alternative_measurement_unit_conversion": {
                    "type": "number"
                  },
                  "ams_active": {
                    "type": "boolean"
                  },
                  "fuel_type_id": {
                    "type": "string",
                    "description": "Valid value from tipos_combustiveis.id,."
                  },
                  "operation_type": {
                    "type": "string",
                    "description": "Valid value from tipologia_operacao.code,."
                  },
                  "statistical_classification": {
                    "type": "string"
                  },
                  "tecdoc_code": {
                    "type": "string"
                  },
                  "tecdoc_supplier": {
                    "type": "string"
                  },
                  "id_code_mr": {
                    "type": "string"
                  },
                  "price1": {
                    "type": "number"
                  },
                  "block1": {
                    "type": "boolean"
                  },
                  "price2": {
                    "type": "number"
                  },
                  "block2": {
                    "type": "boolean"
                  },
                  "price3": {
                    "type": "number"
                  },
                  "block3": {
                    "type": "boolean"
                  },
                  "price4": {
                    "type": "number"
                  },
                  "block4": {
                    "type": "boolean"
                  },
                  "price5": {
                    "type": "number"
                  },
                  "block5": {
                    "type": "boolean"
                  },
                  "price6": {
                    "type": "number"
                  },
                  "block6": {
                    "type": "boolean"
                  },
                  "price7": {
                    "type": "number"
                  },
                  "block7": {
                    "type": "boolean"
                  },
                  "price8": {
                    "type": "number"
                  },
                  "block8": {
                    "type": "boolean"
                  },
                  "price9": {
                    "type": "number"
                  },
                  "block9": {
                    "type": "boolean"
                  },
                  "price10": {
                    "type": "number"
                  },
                  "block10": {
                    "type": "boolean"
                  },
                  "price11": {
                    "type": "number"
                  },
                  "block11": {
                    "type": "boolean"
                  },
                  "price12": {
                    "type": "number"
                  },
                  "block12": {
                    "type": "boolean"
                  },
                  "price13": {
                    "type": "number"
                  },
                  "block13": {
                    "type": "boolean"
                  },
                  "price14": {
                    "type": "number"
                  },
                  "block14": {
                    "type": "boolean"
                  },
                  "price15": {
                    "type": "number"
                  },
                  "block15": {
                    "type": "boolean"
                  },
                  "purchasing_price": {
                    "type": "number",
                    "description": "Cost/purchase price"
                  },
                  "margin_pcu": {
                    "type": "number",
                    "description": "Unit cost margin"
                  },
                  "margin_pcu_type": {
                    "type": "string",
                    "description": "Margin type (value or percentage)"
                  },
                  "energy_class": {
                    "type": "string",
                    "description": "Energy efficiency class"
                  },
                  "stock_min": {
                    "type": "number",
                    "description": "Minimum stock level"
                  },
                  "stock_max": {
                    "type": "number",
                    "description": "Maximum stock level"
                  },
                  "discount_classif": {
                    "type": "string",
                    "description": "Discount classification"
                  },
                  "qty_vehicle": {
                    "type": "number",
                    "description": "Quantity per vehicle"
                  },
                  "qty_pallet": {
                    "type": "number",
                    "description": "Quantity per pallet"
                  },
                  "qty_box": {
                    "type": "number",
                    "description": "Quantity per box"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Article updated successfully",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete article",
        "description": "Permanently deletes an article from the system. This action cannot be undone. Returns 204 No Content on success.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "delete",
          "privileges": [
            "stocks:artigos:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Article deleted successfully",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Article not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "data": {
                    "code": "ARTICLE_NOT_FOUND",
                    "message": "O recurso solicitado não foi encontrado."
                  },
                  "meta": {
                    "trace_id": "9f86d081884c7d659a2feaa0c55ad015"
                  }
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "Article has transactions (ARTICLE_HAS_TRANSACTIONS) or is in documents (ARTICLE_HAS_DOCUMENTS)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "data": {
                    "code": "ARTICLE_HAS_TRANSACTIONS",
                    "message": "Article has stock transactions and cannot be deleted."
                  },
                  "meta": {
                    "trace_id": "9f86d081884c7d659a2feaa0c55ad015"
                  }
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/image": {
      "get": {
        "summary": "Get article image",
        "description": "Retrieves the image URL associated with the article. The article identifier can be passed as plain id or base64-encoded.\n        Returns the image link/path or null if no image exists.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns article image URL or null",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/prices-table": {
      "get": {
        "summary": "List effective price table rows for one article",
        "description": "Returns price table rows for the specified article, with support for date overlap filters and classification/payment filters.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePriceTablePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos:tab:tprecos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter by article ID using operators eq/in",
            "example": "ART001",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "Filter interval start date (Y-m-d)",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Filter interval end date (Y-m-d)",
            "example": "2026-01-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Filter prices valid on a specific date (Y-m-d)",
            "example": "2026-01-15",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation timestamp using operators gte/lte/eq",
            "example": "2026-01-01 00:00:00",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update timestamp using operators gte/lte/eq",
            "example": "2026-01-01 00:00:00",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "classification_code",
            "in": "query",
            "required": false,
            "description": "Filter by classification code using operators eq/in",
            "example": "CL01",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_method_code",
            "in": "query",
            "required": false,
            "description": "Filter by payment method code using operators eq/in",
            "example": "FP01",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price_type",
            "in": "query",
            "required": false,
            "description": "Filter by price type using operator eq",
            "example": "NORMAL",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[article_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[classification_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[classification_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[payment_method_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[payment_method_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[price_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[price_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticlePriceTable"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/prices-config": {
      "get": {
        "summary": "Get resolved price configuration for one article",
        "description": "Returns the first matching price configuration for the article using classification, payment method, date, and optional discount\n        type fallback priority.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePriceTablePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos:tab:tprecos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "classification_id",
            "in": "query",
            "required": false,
            "description": "Classification code to resolve prices",
            "example": "CL01",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_method_id",
            "in": "query",
            "required": false,
            "description": "Payment method code to resolve prices",
            "example": "FP01",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Reference date for price lookup (Y-m-d)",
            "example": "2026-01-15",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "id_discount_type",
            "in": "query",
            "required": false,
            "description": "Discount type ID used as fallback when article-specific price is not found",
            "example": "1",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ArticlePriceTable"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/warehouses-stock": {
      "get": {
        "summary": "List article warehouse stock",
        "description": "Returns stock quantities for the article across all warehouses. Shows available quantity, reserved quantity, and other stock\n        metrics per warehouse. Can be filtered by warehouse_id or date ranges.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse ID (supports IN operator with comma-separated values)",
            "example": "WH001",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date (gte, lte, eq operators)",
            "example": "2023-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date (gte, lte, eq operators)",
            "example": "2023-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stock quantities per warehouse",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/warehouses": {
      "get": {
        "summary": "List article warehouses",
        "description": "Returns stock data per warehouse for the article, aggregating quantities from stock, orders, and configuration tables. Includes\n        supplier, location, and sector data when available.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse code (supports eq, in operators)",
            "example": 1,
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleWarehouseOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/equivalents": {
      "get": {
        "summary": "List article equivalents",
        "description": "Returns equivalent articles - alternative products that can replace this article. Equivalents are articles marked as substitutes\n        in the system. Can be filtered by group_id to get articles in a specific equivalent group.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "equivalents",
          "privileges": [
            "stocks:artigos:tab:artequivalente"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "description": "Filter by equivalent group ID",
            "example": "ART001",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[group_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[group_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Equivalence groups of the article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleEquivalentGroupDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/serial-numbers": {
      "get": {
        "summary": "List article serial numbers",
        "description": "Returns all serial numbers assigned to this article. Only available for articles with serial number tracking enabled\n        (use_serial_numbers flag). Shows serial number status, warehouse location, and other tracking information.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "serialNumbers",
          "privileges": [
            "stocks:artigos:tab:nserie"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "in_stock",
            "in": "query",
            "required": false,
            "description": "Filter by stock availability",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "serial_number",
            "in": "query",
            "required": false,
            "description": "Filter by serial number (supports operators: eq, like)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse ID (supports operators: eq, in)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation timestamp (supports operators: gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update timestamp (supports operators: gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[serial_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like. Example: filter[serial_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object with field => operator => value",
            "example": {
              "serial_number": {
                "like": "SN-2024"
              },
              "warehouse_id": {
                "eq": "WH001"
              }
            },
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of serial numbers for the article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleSerialNumberDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/OffsetPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "offset",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/sets": {
      "get": {
        "summary": "List article sets",
        "description": "Returns article sets (conjuntos) that include this article as a component. Sets are predefined bundles of articles sold\n        together. Shows the parent set article, quantities, and pricing information.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "sets",
          "privileges": [
            "stocks:artigos:tab:conjuntos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter by set article ID (supports operators: eq, like)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date (supports operators: gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date (supports operators: gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like. Example: filter[article_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object with field => operator => value",
            "example": {
              "article_id": {
                "like": "SET-"
              }
            },
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of sets containing this article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleSetDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/OffsetPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "offset",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/suppliers": {
      "get": {
        "summary": "List article suppliers",
        "description": "Returns suppliers associated with this article. Shows supplier codes, prices, lead times, and other purchasing information. An\n        article can have multiple suppliers with different pricing and conditions.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "suppliers",
          "privileges": [
            "stocks:artigos:tab:fornecedores"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "description": "Filter by supplier ID (supports operators: eq, like, sw, ew)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "supplier_name",
            "in": "query",
            "required": false,
            "description": "Filter by supplier name (supports operators: eq, like, sw, ew)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "supplier_number_id",
            "in": "query",
            "required": false,
            "description": "Filter by supplier number ID (supports operators: eq, like, sw, ew)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "Filter by price (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "discount1",
            "in": "query",
            "required": false,
            "description": "Filter by discount level 1 (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "discount2",
            "in": "query",
            "required": false,
            "description": "Filter by discount level 2 (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "discount3",
            "in": "query",
            "required": false,
            "description": "Filter by discount level 3 (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "discount4",
            "in": "query",
            "required": false,
            "description": "Filter by discount level 4 (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "discount5",
            "in": "query",
            "required": false,
            "description": "Filter by discount level 5 (supports operators: eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "preferential",
            "in": "query",
            "required": false,
            "description": "Filter by preferential supplier flag",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[supplier_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[supplier_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[supplier_name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_number_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[supplier_number_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[price][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount1][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[discount1][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[discount2][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount3][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[discount3][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount4][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[discount4][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount5][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[discount5][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filter as JSON object with field => operator => value",
            "example": {
              "supplier_name": {
                "like": "Fornecedor"
              },
              "price": {
                "lte": 50
              }
            },
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of suppliers for the article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleSupplierDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/OffsetPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "offset",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/notes": {
      "get": {
        "summary": "List article notes",
        "description": "Returns notes associated with a specific article. Supports optional filtering by subject.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticleNotePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos:tab:notes"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "description": "Filter notes by subject (partial match)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleNoteOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/warehouses/{warehouse}": {
      "patch": {
        "summary": "Update article warehouse configuration",
        "description": "Updates stock configuration for a specific article-warehouse pair. Supports partial update of min/max stock, replenishment\n        quantity, supplier, and location.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "update",
          "privileges": [
            "stocks:artigos:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "min_stock": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Minimum stock quantity for this warehouse",
                    "example": 10
                  },
                  "max_stock": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Maximum stock quantity for this warehouse",
                    "example": 200
                  },
                  "replenishment_qty": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Replenishment quantity threshold",
                    "example": 50
                  },
                  "supplier_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Supplier ID (must exist in suppliers table)",
                    "example": 42
                  },
                  "location": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255,
                    "description": "Physical location within the warehouse",
                    "example": "A1-B2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Warehouse configuration updated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/generate-barcode": {
      "patch": {
        "summary": "Generate article barcode",
        "description": "Automatically generates and assigns a barcode to the article based on the configured barcode prefix and rules. Updates the\n        article barcode field with the generated value.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Generated barcode data",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/generate-extra-barcode": {
      "patch": {
        "summary": "Generate article extra barcode",
        "description": "Generates an additional barcode (extra barcode) for the article. Articles can have multiple barcodes for different packaging\n        types or retail units. The extra barcode is stored separately from the main barcode.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Generated extra barcode data",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/kits/{line}": {
      "delete": {
        "summary": "Delete a kit component line",
        "description": "Deletes the kit line with the given line number. Returns 409 when more than one component shares that line number.",
        "tags": [
          "Stocks",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "kits",
          "privileges": [
            "stocks:artigos:tab:kits"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "line",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Component line deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Kit line not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "More than one component shares the line number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/appointments": {
      "get": {
        "summary": "List appointments",
        "description": "Returns workshop calendar events within the given date range, optionally filtered by employee, warehouse or department. With `vehicle_plate`, the date range becomes optional and every appointment of that vehicle is returned. With `search`, the date range becomes optional and the endpoint returns the matching appointments from any date, ranked by relevance and capped, with a `meta` object describing the cap.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "Filter by employee ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "department_id",
            "in": "query",
            "required": false,
            "description": "Filter by department ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "service_order",
            "in": "query",
            "required": false,
            "description": "Filter by service order number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "rescheduled_from",
            "in": "query",
            "required": false,
            "description": "Filter appointments rescheduled from the given appointment ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "vehicle_plate",
            "in": "query",
            "required": false,
            "description": "Exact vehicle plate. When present, the date range becomes optional and every appointment of the vehicle is returned, uncapped.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Text search on subject, customer name, vehicle plate and service order number. When present, the date range becomes optional and the search is global; results are ranked by relevance and capped (see meta).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "Start of the date range. Required unless search or vehicle_plate is present, and always required together with end.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "End of the date range. Required unless search or vehicle_plate is present, and always required together with start.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AppointmentOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create appointment",
        "description": "When `reception_date` or `delivery_date` are sent together with a `service_order`, those datetimes are also written to the linked service order and `meta.service_order_dates_synced` reports the outcome (false when the order is closed, invoiced, delivered or cancelled). Without a `service_order`, the `service_order_creation` agenda parameter decides what is created when `customer_id` and `vehicle_plate` are both present and the user holds `oficinas:ordservico:new`: `none` creates nothing, `draft` (the default) a replaceable draft order in status `RAS`, and `issued` a numbered service order in the `service_order_initial_status` agenda status, or without one in the status configured as initial, carrying the interventions with their minutes and extra description. Otherwise the appointments are created unlinked, which is not an error. A created order keeps the status it was created with. A `rescheduled_from` without a `service_order` carries on the order of the rescheduled appointment, as if it had been sent, unless that order is cancelled, belongs to another plate or is in a status that does not allow scheduling; the parameter then decides as for a new appointment. With the `split_planning_enabled` agenda parameter on and a `plan` confirmed after POST /workshop/appointments/plan, the plan is recalculated under a lock per mechanic and day and in the same transaction as the write: when it still matches, its segments are written as confirmed; when the space is no longer free, nothing is written and the response is 409 with the recalculated plan in `data.appointments`, in the plan endpoint format. A recalculation that hits a limit is rejected with 422 as the plan endpoint does. With the parameter off, `plan` is still validated but not used, and the appointment is written as requested, in one block.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "create"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "object",
                    "description": "The plan confirmed after POST /workshop/appointments/plan. Always validated, but only used when the `split_planning_enabled` agenda parameter is on: `allow_split` (the option chosen; in the grouped body, of every group without its own `allow_split`), `simultaneous` (grouped body) and `appointments`, the `data.appointments` of the plan response echoed back, one per appointment and in the same order. The plan is recalculated under a lock per mechanic and day; when it no longer matches, nothing is written and the response is 409 with the recalculated plan.",
                    "example": {
                      "allow_split": true,
                      "appointments": [
                        {
                          "segments": [
                            {
                              "start": "2026-10-06 17:00:00",
                              "end": "2026-10-06 18:00:00"
                            },
                            {
                              "start": "2026-10-07 09:00:00",
                              "end": "2026-10-07 10:00:00"
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "employee_id": {
                    "type": "number"
                  },
                  "vehicle_plate": {
                    "type": "string"
                  },
                  "confirmed": {
                    "type": "string"
                  },
                  "completed": {
                    "type": "string"
                  },
                  "location": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string"
                  },
                  "contact_name": {
                    "type": "string"
                  },
                  "contact_phone": {
                    "type": "string"
                  },
                  "customer_id": {
                    "type": "number"
                  },
                  "observations": {
                    "type": "string"
                  },
                  "reception_date": {
                    "type": "string"
                  },
                  "delivery_date": {
                    "type": "string"
                  },
                  "warehouse_id": {
                    "type": "number"
                  },
                  "department_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Valid value from departamentos.id."
                  },
                  "service_order": {
                    "type": "string"
                  },
                  "rescheduled_from": {
                    "type": "number",
                    "description": "Valid value from relcontacto.numrel."
                  },
                  "checklists": {
                    "type": "array"
                  },
                  "notify_send_email": {
                    "type": "string"
                  },
                  "notify_send_sms": {
                    "type": "string"
                  },
                  "interventions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "time": {
                          "type": "number"
                        },
                        "sequence": {
                          "type": "number"
                        },
                        "extra_description": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "subject",
                  "start",
                  "end"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AppointmentPlanOutputDTO"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/appointments/batch": {
      "post": {
        "summary": "Create appointments batch",
        "description": "Creates one appointment per intervention group in a single transaction. All created appointments share one service order: an explicit `service_order` number is validated and reused. Without a `service_order`, the `service_order_creation` agenda parameter decides what is created when `customer_id` and `vehicle_plate` are both present and the user holds `oficinas:ordservico:new`: `none` creates nothing, `draft` (the default) a replaceable draft order in status `RAS`, and `issued` a numbered service order in the `service_order_initial_status` agenda status, or without one in the status configured as initial, carrying the interventions with their minutes and extra description. Otherwise the appointments are created unlinked, which is not an error. A created order keeps the status it was created with. A `rescheduled_from` without a `service_order` carries on the order of the rescheduled appointment, as if it had been sent, unless that order is cancelled, belongs to another plate or is in a status that does not allow scheduling; the parameter then decides as for a new appointment. `reception_date`/`delivery_date` are written to the service order once per batch, never once per group, and `meta.service_order_dates_synced` reports the outcome. With the `split_planning_enabled` agenda parameter on and a `plan` confirmed after POST /workshop/appointments/plan, the plan is recalculated under a lock per mechanic and day and in the same transaction as the write: when it still matches, its segments are written as confirmed; when the space is no longer free, nothing is written and the response is 409 with the recalculated plan in `data.appointments`, in the plan endpoint format. A recalculation that hits a limit is rejected with 422 as the plan endpoint does. With the parameter off, `plan` is still validated but not used, and the appointment is written as requested, in one block. Each group is recalculated with its own `allow_split` when it carries one, else with `plan.allow_split`: send the same `groups` that were sent to the plan endpoint.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "createBatch",
          "privileges": [
            "oficinas:agenda",
            "oficinas:ordservico:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "object",
                    "description": "The plan confirmed after POST /workshop/appointments/plan. Always validated, but only used when the `split_planning_enabled` agenda parameter is on: `allow_split` (the option chosen; in the grouped body, of every group without its own `allow_split`), `simultaneous` (grouped body) and `appointments`, the `data.appointments` of the plan response echoed back, one per appointment and in the same order. The plan is recalculated under a lock per mechanic and day; when it no longer matches, nothing is written and the response is 409 with the recalculated plan.",
                    "example": {
                      "allow_split": true,
                      "appointments": [
                        {
                          "segments": [
                            {
                              "start": "2026-10-06 17:00:00",
                              "end": "2026-10-06 18:00:00"
                            },
                            {
                              "start": "2026-10-07 09:00:00",
                              "end": "2026-10-07 10:00:00"
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "customer_id": {
                    "type": "number"
                  },
                  "contact_name": {
                    "type": "string"
                  },
                  "contact_phone": {
                    "type": "string"
                  },
                  "vehicle_plate": {
                    "type": "string"
                  },
                  "location": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string"
                  },
                  "observations": {
                    "type": "string"
                  },
                  "reception_date": {
                    "type": "string"
                  },
                  "delivery_date": {
                    "type": "string"
                  },
                  "warehouse_id": {
                    "type": "number"
                  },
                  "service_order": {
                    "type": "string"
                  },
                  "checklists": {
                    "type": "array"
                  },
                  "rescheduled_from": {
                    "type": "number",
                    "description": "Valid value from relcontacto.numrel."
                  },
                  "notify_send_email": {
                    "type": "string"
                  },
                  "notify_send_sms": {
                    "type": "string"
                  },
                  "groups": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "employee_id": {
                          "type": "number"
                        },
                        "department_id": {
                          "type": "number",
                          "nullable": true,
                          "description": "Valid value from departamentos.id."
                        },
                        "start": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "end": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "allow_split": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "start",
                        "end"
                      ]
                    }
                  }
                },
                "required": [
                  "subject"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentsBatchOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AppointmentPlanOutputDTO"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/appointments/plan": {
      "post": {
        "summary": "Plan appointment segments",
        "description": "Proposes the segments of an appointment without writing anything. Accepts the classic body (`start`, `end`, `employee_id`, `department_id`, `interventions`) or the grouped one (`groups`). With a mechanic the windows are the business hours minus their appointments up to the concurrency limit; with only a department, the business hours; with neither, the appointment is not split. Holidays, non-business days, vacations and absences cut according to the agenda restrictions. A plan that exceeds `max_segments` or `max_spill_days`, or for which no window serves, is rejected with 422 and `data.errors.plan.limit` (`max_segments`, `max_spill_days`, `no_window`) plus `group_index` for the grouped body. In the grouped body each group may carry its own `allow_split`, which wins over the one of the request; every planned appointment returns the `allow_split` it was laid with. The client only asks for a plan when the `split_planning_enabled` agenda parameter is on.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "create"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allow_split": {
                    "type": "boolean",
                    "description": "true lays the work across the next windows; false pushes it whole into the first window that holds it. In the grouped body, the option of every group that does not carry its own.",
                    "example": true
                  },
                  "start": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Classic body: requested start, `Y-m-d H:i`. Required without `groups`.",
                    "example": "2026-10-06 17:00"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Classic body: requested end, `Y-m-d H:i`; `end - start` is the work to plan.",
                    "example": "2026-10-06 19:00"
                  },
                  "employee_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Mechanic: windows come from the business hours and their appointments, up to the concurrency limit.",
                    "example": 3
                  },
                  "department_id": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Department, used when there is no mechanic: windows come from the business hours only.",
                    "example": 4
                  },
                  "interventions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "time": {
                          "type": "number"
                        }
                      }
                    },
                    "description": "Planned in the order received; each with `id` and optional `time` in minutes (else the catalogue estimate).",
                    "example": [
                      {
                        "id": 83,
                        "time": 120
                      }
                    ]
                  },
                  "groups": {
                    "type": "array",
                    "description": "Grouped body: one appointment per group, each with `start`, `end`, `employee_id`, `department_id`, `interventions` and an optional `allow_split` that wins over the one of the request. After the first, each group starts where the previous one's last segment ends, as laid with that group's option.",
                    "example": [
                      {
                        "start": "2026-10-06 17:00",
                        "end": "2026-10-06 19:00",
                        "employee_id": 3,
                        "allow_split": false,
                        "interventions": [
                          {
                            "id": 83,
                            "time": 120
                          }
                        ]
                      }
                    ]
                  },
                  "simultaneous": {
                    "type": "boolean",
                    "description": "Grouped body: every group starts at `reception_date` and their segments may overlap.",
                    "example": false
                  },
                  "reception_date": {
                    "type": "string",
                    "description": "Vehicle reception, `Y-m-d H:i`. Required when `simultaneous` is true.",
                    "example": "2026-10-06 17:00"
                  }
                },
                "required": [
                  "allow_split",
                  "start",
                  "end"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentPlanOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/appointments/associate-service-order": {
      "post": {
        "summary": "Associate appointments with a service order",
        "description": "Links every appointment in `appointment_ids` to `service_order` in one transaction: either all are linked or none is. The service order is validated as in the appointment update (it must exist, not be cancelled, belong to the plate of each appointment and have a status that allows scheduling), otherwise 422 with `errors.service_order`. Unknown ids answer 422 with `errors.appointment_ids`. Appointments already linked to another service order answer 409 with `errors.conflicts` listing each of them with that order number and document number; one already linked to the requested order is left as it is. The service order takes the earliest reception and the latest delivery datetime of the appointments, reported in `meta.service_order_dates_synced` when any of them has one.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "update"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "service_order": {
                    "type": "string"
                  },
                  "appointment_ids": {
                    "type": "array"
                  }
                },
                "required": [
                  "service_order",
                  "appointment_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentServiceOrderAssociationOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/appointments/upcoming": {
      "get": {
        "summary": "List own upcoming appointments",
        "description": "Returns workshop appointments linked to a vehicle/service order (numos, codequipext or is_osv), not yet done, from a start date (default today) onward with no upper bound, ordered by id descending and capped by limit. Scoped to the authenticated employee unless employee_id is given. Powers the OGMF \"Marcações\" dashboard widget (dashboard.id=69).",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "view"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "Employee ID to list appointments for. Default: the authenticated employee. No extra privilege is required: oficinas:agenda already exposes every employee's appointments through GET /v2/workshop/appointments.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "is_done",
            "in": "query",
            "required": false,
            "description": "Filter by done status. Default: false (not yet done).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "Lower bound for the start date, open-ended (no upper bound). Default: today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of appointments returned, ordered by id descending. Default: 100.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AppointmentUpcomingOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/appointments/{id}": {
      "get": {
        "summary": "Get appointment",
        "description": "Returns a single workshop appointment with full detail including vehicle, interventions, checklists and entities.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "view"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update appointment",
        "description": "Sending `reception_date` or `delivery_date` also updates the linked service order and reports the outcome in `meta.service_order_dates_synced`. The appointment `end` is never used as the service order delivery datetime: only the explicit fields propagate. Clearing `no_show` is rejected with 409 once at least one appointment has been rescheduled from this one, and a cascade that clears it reports siblings in the same situation under `meta.cascade.skipped_ids`. A new `service_order` is rejected with 422 unless it exists, is not cancelled, belongs to the appointment plate and its status allows scheduling. An empty `service_order` unlinks the appointment without validating the order. Linking a new service order moves it to the scheduled status, as creating an appointment does, and unlinking the last appointment of an order in that status moves it back to waiting, as deleting one does.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "update"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "start": {
                    "type": "string"
                  },
                  "end": {
                    "type": "string"
                  },
                  "employee_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "vehicle_plate": {
                    "type": "string"
                  },
                  "confirmed": {
                    "type": "boolean"
                  },
                  "completed": {
                    "type": "boolean"
                  },
                  "no_show": {
                    "type": "boolean"
                  },
                  "cascade_service_order": {
                    "type": "boolean"
                  },
                  "all_day": {
                    "type": "string"
                  },
                  "location": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string"
                  },
                  "contact_name": {
                    "type": "string"
                  },
                  "contact_phone": {
                    "type": "string"
                  },
                  "customer_id": {
                    "type": "number"
                  },
                  "observations": {
                    "type": "string"
                  },
                  "reception_date": {
                    "type": "string"
                  },
                  "delivery_date": {
                    "type": "string"
                  },
                  "warehouse_id": {
                    "type": "number"
                  },
                  "department_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Valid value from departamentos.id."
                  },
                  "service_order": {
                    "type": "string"
                  },
                  "checklists": {
                    "type": "array"
                  },
                  "interventions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "time": {
                          "type": "number"
                        },
                        "sequence": {
                          "type": "number"
                        },
                        "extra_description": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AppointmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete appointment",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "delete"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/customers/{customer}/appointment-attendance": {
      "get": {
        "summary": "Customer appointment attendance",
        "description": "Returns no-show count against the last 10 past appointments (workshop + CRM) for a customer.",
        "tags": [
          "Workshop Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerAppointmentAttendanceOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/alerts/{client}": {
      "get": {
        "summary": "List alerts for client",
        "description": "Returns inspection, oil change, and tire change alerts for a specific client.",
        "tags": [
          "Workshop",
          "Alerts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Alert\\Policies\\AlertPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:alertas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "client",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AlertOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicle-generations/search": {
      "get": {
        "summary": "Search vehicle generations",
        "description": "Searches vehicle generations with advanced filters, optional model/brand info, and custom sorting.",
        "tags": [
          "Workshop",
          "Vehicle Generations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\VehicleGeneration\\Policies\\VehicleGenerationPolicy",
          "ability": "search",
          "privileges": [
            "oficinas:apoio:geracao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "model_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "additional_fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date_start][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[date_start][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date_end][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[date_end][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[model_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[model_id][eq]=value",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleGenerationOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/schedules": {
      "get": {
        "summary": "List schedules",
        "description": "Returns a list of workshop schedules/appointments with optional filters and sorting.",
        "tags": [
          "Workshop",
          "Schedules"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Schedule\\Policies\\SchedulePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "subject",
                "plate",
                "service_order",
                "start_date",
                "end_date",
                "start_time",
                "end_time",
                "customer_id",
                "place",
                "priority",
                "is_accomplished"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC)",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter criteria",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ScheduleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/contacts": {
      "get": {
        "summary": "List contacts",
        "description": "Returns a paginated list of general contacts with optional filtering and sorting.",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades:contactos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field. Prefix with - for descending.",
            "example": "-name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[name]",
            "in": "query",
            "required": false,
            "description": "Filter by contact name.",
            "example": "Silva",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[email]",
            "in": "query",
            "required": false,
            "description": "Filter by email address.",
            "example": "joao@exemplo.pt",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country]",
            "in": "query",
            "required": false,
            "description": "Filter by country code.",
            "example": "PT",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[taxid]",
            "in": "query",
            "required": false,
            "description": "Filter by tax ID.",
            "example": "123456789",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ContactOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create new contact",
        "description": "Creates a new general contact. Automatically creates entity contacts for email, phone and mobile.",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "create",
          "privileges": [
            "entidades:contactos:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 4,
                    "description": "Contact full name. Minimum 4 characters.",
                    "example": "Joao Silva"
                  },
                  "address": {
                    "type": "string",
                    "nullable": true
                  },
                  "city": {
                    "type": "string",
                    "nullable": true
                  },
                  "zipcode": {
                    "type": "string",
                    "nullable": true
                  },
                  "country": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 3,
                    "description": "Country code (max 3 chars).",
                    "example": "PT"
                  },
                  "phone1": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "/^\\+[0-9]+\\.[0-9]+$/",
                    "description": "Phone number in format +XXX.XXXXXXXXX.",
                    "example": "+351.912345678"
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "/^\\+[0-9]+\\.[0-9]+$/"
                  },
                  "mobilephone": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "/^\\+[0-9]+\\.[0-9]+$/",
                    "description": "Mobile phone in format +XXX.XXXXXXXXX.",
                    "example": "+351.961234567"
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email",
                    "description": "Primary email address.",
                    "example": "joao@exemplo.pt"
                  },
                  "email2": {
                    "type": "string",
                    "nullable": true,
                    "format": "email"
                  },
                  "email3": {
                    "type": "string",
                    "nullable": true,
                    "format": "email"
                  },
                  "taxid": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "profession_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 8
                  },
                  "rgdp_allow_mailing": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContactOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/contacts/{contact}/associate": {
      "post": {
        "summary": "Associate contact with entity",
        "description": "Associates an existing contact with an entity (Customer, Supplier, Prospect, Seller).",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "update",
          "privileges": [
            "entidades:contactos:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F",
                      "P",
                      "R"
                    ],
                    "description": "Entity type: C (Customer), F (Supplier), P (Prospect), R (Seller).",
                    "example": "C"
                  },
                  "entity_id": {
                    "type": "integer",
                    "description": "Entity ID to associate with.",
                    "example": 456
                  },
                  "is_default": {
                    "type": "boolean",
                    "description": "Whether this is the default contact for the entity.",
                    "example": true
                  },
                  "role_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6,
                    "description": "Function/role code.",
                    "example": "1"
                  },
                  "department": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 40
                  },
                  "extension": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 16
                  },
                  "observations": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 80
                  }
                },
                "required": [
                  "entity_type",
                  "entity_id",
                  "is_default"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContactOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/contacts/{contact}": {
      "get": {
        "summary": "Get contact by ID",
        "description": "Returns detailed information for a specific contact including associated entities.",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "view",
          "privileges": [
            "entidades:contactos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContactOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update contact",
        "description": "Updates contact fields sent in the request payload. All fields are optional.",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "update",
          "privileges": [
            "entidades:contactos:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 4
                  },
                  "address": {
                    "type": "string",
                    "nullable": true
                  },
                  "city": {
                    "type": "string",
                    "nullable": true
                  },
                  "zipcode": {
                    "type": "string",
                    "nullable": true
                  },
                  "country": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 3
                  },
                  "phone1": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "/^\\+[0-9]+\\.[0-9]+$/"
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "/^\\+[0-9]+\\.[0-9]+$/"
                  },
                  "mobilephone": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "/^\\+[0-9]+\\.[0-9]+$/"
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email"
                  },
                  "email2": {
                    "type": "string",
                    "nullable": true,
                    "format": "email"
                  },
                  "email3": {
                    "type": "string",
                    "nullable": true,
                    "format": "email"
                  },
                  "taxid": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "profession_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 8
                  },
                  "rgdp_allow_mailing": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContactOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/contacts/{contact}/entities": {
      "get": {
        "summary": "List contact entities",
        "description": "Returns entities (Customers, Suppliers, etc.) associated with this contact.",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "view",
          "privileges": [
            "entidades:contactos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[entity_type]",
            "in": "query",
            "required": false,
            "description": "Filter by entity type: C (Customer), F (Supplier), P (Prospect), R (Seller).",
            "example": "C",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ContactEntityOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/contacts/{contact}/extra-fields": {
      "get": {
        "summary": "List contact extra fields",
        "description": "Returns extra fields (Campos Extra) configured for the contact.",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "view",
          "privileges": [
            "entidades:contactos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExtraFieldOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/contacts/{contact}/contacts": {
      "get": {
        "summary": "List contact sub-contacts",
        "description": "Returns entity contacts (phone, email, etc.) associated with this contact.",
        "tags": [
          "Entities",
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Contacts\\Policies\\ContactPolicy",
          "ability": "view",
          "privileges": [
            "entidades:contactos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EmployeeContactOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/action-log": {
      "get": {
        "summary": "List action logs",
        "description": "Returns the action logs of a document with optional date filtering, newest first (ties by id).\n        Paginated with page and limit. With datatable the DataTables envelope is returned instead, with every log\n        of the document and limit only truncating it.",
        "tags": [
          "Sales",
          "Action Log"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\ActionLog\\Policies\\ActionLogPolicy",
          "ability": "viewAny",
          "privileges": [
            "vendas:actionlog:view:all"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "document_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "datatable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of action log entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "ip": {
                            "type": "string",
                            "nullable": true
                          },
                          "user_agent": {
                            "type": "string",
                            "nullable": true
                          },
                          "session_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "action": {
                            "type": "string"
                          },
                          "document_type": {
                            "type": "string"
                          },
                          "document_number": {
                            "type": "string"
                          },
                          "action_date": {
                            "type": "string",
                            "example": "2026-01-31 10:00:00"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-01-31 10:00:00"
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create action log",
        "description": "Creates a new action log entry for a sales document operation.",
        "tags": [
          "Sales",
          "Action Log"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\ActionLog\\Policies\\ActionLogPolicy",
          "ability": "create"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ip": {
                    "type": "string"
                  },
                  "user_agent": {
                    "type": "string"
                  },
                  "session_id": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  },
                  "document_type": {
                    "type": "string"
                  },
                  "document_number": {
                    "type": "integer"
                  },
                  "action_date": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "action",
                  "document_type",
                  "document_number",
                  "action_date"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Action log entry created successfully.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error or failed to create log entry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/docs-drafts-lite": {
      "post": {
        "summary": "Create document or draft (lite)",
        "description": "Creates a sales document or draft with minimal required fields. Document type is resolved from dtype alias and company parameters.",
        "tags": [
          "Sales",
          "Others"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Others\\Policies\\SalesOthersPolicy",
          "ability": "createDocDraftLite",
          "privileges": [
            "vendas:{type}:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dtype": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "document": {
                    "type": "object",
                    "properties": {
                      "idcustomer": {
                        "type": "string"
                      }
                    }
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "idarticle": {
                          "type": "string"
                        },
                        "quantity": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        },
                        "sellingprice": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        }
                      },
                      "required": [
                        "idarticle"
                      ]
                    }
                  }
                },
                "required": [
                  "dtype"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocDraftLiteOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation or business rule error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/documents/{type}/{id}/at-stock-movement": {
      "post": {
        "summary": "Communicate transport document to AT",
        "description": "Sends a transport document to the Portuguese Tax Authority (AT) webservice. Validates document eligibility before communicating.",
        "tags": [
          "Sales",
          "Others"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Others\\Policies\\SalesOthersPolicy",
          "ability": "communicateAtStockMovement",
          "privileges": [
            "vendas:{type}:edit",
            "stocks:movstock:movimentos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document communicated successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Invalid document type or communication not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Document not eligible for AT communication.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/pending-payment": {
      "get": {
        "summary": "List documents pending payment",
        "description": "Returns sales documents (FT, NC, ND) with pending payment amount, optionally filtered by customer or date,\n        ordered by date and number descending and then by document type.",
        "tags": [
          "Sales",
          "Others"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Others\\Policies\\SalesOthersPolicy",
          "ability": "viewPendingPayment",
          "privileges": [
            "vendas:recibos:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: lte. Example: filter[date][lte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PendingPaymentOutputDTO"
                      }
                    },
                    "meta": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PaginationMeta"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "deprecated": true,
                              "description": "Number of pending documents across all pages."
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/dtypes-lite": {
      "get": {
        "summary": "List lite document types",
        "description": "Returns the simplified list of document types allowed for the docs-drafts-lite endpoint.",
        "tags": [
          "Sales",
          "Others"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Others\\Policies\\SalesOthersPolicy",
          "ability": "viewDtypesLite",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "List of allowed document type aliases.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/direct-entry/{type}": {
      "get": {
        "summary": "List direct entry records",
        "description": "Returns paginated direct entry records. Type must be \"dcc\" (credit) or \"dcf\" (debit).",
        "tags": [
          "Sales",
          "Others"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Others\\Policies\\SalesOthersPolicy",
          "ability": "viewDirectEntry",
          "privileges": [
            "vendas:{type}:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "total",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "amount_paid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "debit_credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[number][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[document_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[document_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[total][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[total][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[amount_paid][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[amount_paid][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[debit_credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[debit_credit][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectEntryOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Invalid entry type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/notes": {
      "get": {
        "summary": "List service order notes",
        "description": "Returns every note of one service order, newest first, with author identity and whether the caller may edit or delete each one.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderNotePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:padscreen:notas:view",
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderNoteDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create service order note",
        "description": "Creates a note for one service order. Omitting the subject stores it empty, which is what the quick notes feed does; no notification is sent unless notify is given.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderNotePolicy",
          "ability": "create",
          "privileges": [
            "oficinas:padscreen:notas:new",
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "nullable": true,
                    "description": "Note subject. Optional: the quick notes feed omits it and the note is stored with an empty subject."
                  },
                  "content": {
                    "type": "string",
                    "description": "Note content."
                  },
                  "notify": {
                    "type": "string",
                    "enum": [
                      "employee",
                      "customer"
                    ],
                    "description": "Notification target. Accepted values: employee or customer."
                  },
                  "employee_id": {
                    "type": "integer",
                    "description": "Employee id used when notify is employee."
                  },
                  "email": {
                    "type": "string",
                    "description": "Customer email used when notify is customer."
                  },
                  "mobile": {
                    "type": "string",
                    "description": "Customer mobile used when notify is customer."
                  },
                  "attachment_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "Attachment ids associated with the note."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Note created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateServiceOrderNoteDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/maintenance-notices": {
      "get": {
        "summary": "List maintenance notices",
        "description": "Returns a list of public maintenance plan notices with optional filters and sorting.",
        "tags": [
          "Workshop",
          "Maintenance Notices"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\MaintenanceNotice\\Policies\\MaintenanceNoticePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:manutencao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field (plate, limit_date, km_vehicle, obs)",
            "schema": {
              "type": "string",
              "enum": [
                "plate",
                "limit_date",
                "km_vehicle",
                "obs"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC)",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter criteria",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MaintenanceNoticeOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/notes/{note}": {
      "patch": {
        "summary": "Update service order note",
        "description": "Replaces the text of one note. Only the note author may do it; subject, collaborator and notification settings are not editable through this endpoint.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderNotePolicy",
          "ability": "update",
          "privileges": [
            "oficinas:padscreen:notas:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "note",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "Note content."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateServiceOrderNoteDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Note not found for this service order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete service order note",
        "description": "Removes one note. Only the note author may do it.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderNotePolicy",
          "ability": "delete",
          "privileges": [
            "oficinas:padscreen:notas:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "note",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Note not found for this service order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/camera-plates": {
      "get": {
        "summary": "List camera plate readings",
        "description": "Returns a list of camera plate readings with vehicle information.",
        "tags": [
          "Workshop",
          "Camera Plates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\CameraPlate\\Policies\\CameraPlatePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter criteria",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CameraPlateVehicleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Store camera plate reading",
        "description": "Creates or updates a camera plate reading. Updates confidence only if the new value is higher.",
        "tags": [
          "Workshop",
          "Camera Plates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\CameraPlate\\Policies\\CameraPlatePolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "minLength": 4,
                    "description": "Vehicle plate number (min 4 chars)"
                  },
                  "confidence": {
                    "type": "number",
                    "minimum": 40,
                    "description": "Recognition confidence (min 40)"
                  }
                },
                "required": [
                  "plate",
                  "confidence"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CameraPlateStoreOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/prospects": {
      "get": {
        "summary": "List prospects",
        "description": "Returns prospects with optional filtering by identification and address fields.",
        "tags": [
          "Entities",
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades:prospect"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by prospect name.",
            "example": "Silva",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "address2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "Filter by city.",
            "example": "Lisboa",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "district_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3,
              "minLength": 2
            },
            "deprecated": true
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "mobile_phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "fax",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Filter by email address.",
            "example": "contacto@prospect.pt",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Filter by active status.",
            "example": true,
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "seller_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "operator",
            "in": "query",
            "required": false,
            "description": "Default operator for simple filters (eq, ct, like, sw, ew).",
            "example": "ct",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[address2][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[district_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[district_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[phone2][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[mobile_phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[mobile_phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[fax][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[fax][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[email][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[email][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[seller_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[seller_code][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters using filter[field][operator]=value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProspectOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create new prospect",
        "description": "Creates a prospect with legal, address and contact data.",
        "tags": [
          "Entities",
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "create",
          "privileges": [
            "entidades:prospect:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Full name or company name.",
                    "example": "Prospect Silva Lda"
                  },
                  "tax_id": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Tax identification number (NIF).",
                    "example": "999999990"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Primary address.",
                    "example": "Rua das Flores, 123"
                  },
                  "address2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254,
                    "description": "Secondary address line.",
                    "example": "2o andar"
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 4,
                    "description": "Postal/ZIP code.",
                    "example": "1000-001"
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "City / locality.",
                    "example": "Lisboa"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254,
                    "description": "Email address.",
                    "example": "contacto@prospect.pt"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Landline phone number.",
                    "example": "213456789"
                  }
                },
                "required": [
                  "name",
                  "tax_id",
                  "address",
                  "postal_code",
                  "city",
                  "country_code",
                  "email",
                  "mobile_phone"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProspectOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/prospects/{prospect}": {
      "get": {
        "summary": "Get prospect by ID",
        "description": "Returns detailed information for a specific prospect including country data.",
        "tags": [
          "Entities",
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "view",
          "privileges": [
            "entidades:prospect"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProspectOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update prospect",
        "description": "Updates prospect fields sent in the request payload. All fields are optional.",
        "tags": [
          "Entities",
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "update",
          "privileges": [
            "entidades:prospect:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Full name or company name.",
                    "example": "Prospect Silva Lda"
                  },
                  "tax_id": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Tax identification number (NIF).",
                    "example": "999999990"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Primary address.",
                    "example": "Rua das Flores, 123"
                  },
                  "address2": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Secondary address line.",
                    "example": "2o andar"
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Postal/ZIP code.",
                    "example": "1000-001"
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "City / locality.",
                    "example": "Lisboa"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254,
                    "description": "Email address.",
                    "example": "contacto@prospect.pt"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Landline phone number.",
                    "example": "213456789"
                  },
                  "phone2": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Secondary phone number.",
                    "example": "214567890"
                  },
                  "fax": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Fax number.",
                    "example": "215678901"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Active status.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProspectOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete prospect",
        "description": "Deletes a prospect by ID.",
        "tags": [
          "Entities",
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "delete",
          "privileges": [
            "entidades:prospect:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Prospect deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/prospects/{prospect}/contacts": {
      "get": {
        "summary": "List prospect contacts",
        "description": "Returns a paginated list of contacts associated with the prospect.",
        "tags": [
          "Entities",
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "view",
          "privileges": [
            "entidades:prospect"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[contact_type]",
            "in": "query",
            "required": false,
            "description": "Filter by contact type (e.g. email, phone, mobile).",
            "example": "email",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[contact]",
            "in": "query",
            "required": false,
            "description": "Filter by contact value.",
            "example": "prospect@empresa.pt",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[preferential]",
            "in": "query",
            "required": false,
            "description": "Filter by preferential flag.",
            "example": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProspectContactOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/mechanic-availability": {
      "get": {
        "summary": "Mechanic availability",
        "description": "Returns lists of available and busy mechanics in the workshop.",
        "tags": [
          "Workshop",
          "Mechanic Availability"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\MechanicAvailability\\Policies\\MechanicAvailabilityPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MechanicAvailabilityOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/mechanic-availability/occupancy": {
      "get": {
        "summary": "Mechanic occupancy heatmap",
        "description": "Per mechanic and day: occupied minutes (appointments) and scheduled minutes (capacity), plus the day status.",
        "tags": [
          "Workshop",
          "Mechanic Availability"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\MechanicAvailability\\Policies\\MechanicAvailabilityPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "Interval start date (inclusive)",
            "example": "2026-07-20",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "Interval end date (inclusive)",
            "example": "2026-07-26",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter mechanics by their associated warehouse",
            "example": 10,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_hidden_days",
            "in": "query",
            "required": false,
            "description": "Also return the weekdays hidden in the agenda view (OFIC_hide_days), which are omitted by default",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "departments",
            "in": "query",
            "required": false,
            "description": "Filter mechanics by department ids (departments[]=4&departments[]=6)",
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "employees",
            "in": "query",
            "required": false,
            "description": "Filter mechanics by employee ids (employees[]=3&employees[]=5)",
            "schema": {
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MechanicOccupancyItemOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/dashboards": {
      "get": {
        "summary": "Get the company default dashboard layout",
        "description": "Returns the OGMF layout shared by every employee without a personal layout, together with the widget settings stored for the company default.",
        "tags": [
          "Dashboards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\DashboardsPolicy",
          "ability": "view"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Company default layout",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DashboardLayoutOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Replace the company default dashboard layout",
        "description": "Replaces every row of each side present in the payload. Omitted sides stay untouched. A settings map, when present, replaces the whole company-default set in the same transaction. Rejects a placement key placed twice and two placed copies of a widget with equal settings.",
        "tags": [
          "Dashboards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\DashboardsPolicy",
          "ability": "editOthers",
          "privileges": [
            "dashboard:edit-others"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "main": {
                    "type": "array",
                    "nullable": true,
                    "description": "Grid rows, each with 1 to 3 cells. Replaces every main row when present. A cell holds a placement key: the OGMF widget id for its first copy, \"<id>#<n>\" with n >= 2 for each further copy.",
                    "example": [
                      {
                        "cells": [
                          "sales.sales_by_day",
                          "sales.sales_by_day#2"
                        ]
                      }
                    ]
                  },
                  "rail": {
                    "type": "array",
                    "nullable": true,
                    "description": "Rail rows, each with exactly 1 cell. Replaces every rail row when present.",
                    "example": [
                      {
                        "cells": [
                          "news"
                        ]
                      }
                    ]
                  },
                  "settings": {
                    "type": "array",
                    "nullable": true,
                    "description": "Widget settings keyed by placement key. Replaces the owner's whole set when present. Each value is stored and served back verbatim. Two placed copies of the same widget cannot have equal settings; a further copy no cell places is dropped.",
                    "example": {
                      "sales.sales_by_day": {
                        "days": 7,
                        "graphType": "bar"
                      },
                      "sales.sales_by_day#2": {
                        "days": 30,
                        "graphType": "line"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored company default layout",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DashboardLayoutOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/dashboards/widgets": {
      "get": {
        "summary": "List the OGMF widget catalog",
        "description": "Returns the OGMF widgets whose module and privilege gates the target employee passes.",
        "tags": [
          "Dashboards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\DashboardsPolicy",
          "ability": "view"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee",
            "in": "query",
            "required": false,
            "description": "Employee whose module/privilege gates resolve the catalog. Defaults to the authenticated user.",
            "example": 42,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Widget catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DashboardWidgetOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/dashboards/{employee}": {
      "get": {
        "summary": "Get an employee dashboard layout",
        "description": "Falls back to the company default when the employee has no personal layout, reporting the origin in the source field. Widget settings fall back the same way, independently of the layout: an employee with no settings rows inherits the company set whole.",
        "tags": [
          "Dashboards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\DashboardsPolicy",
          "ability": "view"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Employee layout",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DashboardLayoutOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Replace an employee dashboard layout",
        "description": "Replaces every row of each side present in the payload. Omitted sides stay untouched. A settings map, when present, replaces the employee's whole set in the same transaction. Rejects a placement key placed twice and two placed copies of a widget with equal settings.",
        "tags": [
          "Dashboards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\DashboardsPolicy",
          "ability": "view"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "main": {
                    "type": "array",
                    "nullable": true,
                    "description": "Grid rows, each with 1 to 3 cells. Replaces every main row when present. A cell holds a placement key: the OGMF widget id for its first copy, \"<id>#<n>\" with n >= 2 for each further copy.",
                    "example": [
                      {
                        "cells": [
                          "sales.sales_by_day",
                          "sales.sales_by_day#2"
                        ]
                      }
                    ]
                  },
                  "rail": {
                    "type": "array",
                    "nullable": true,
                    "description": "Rail rows, each with exactly 1 cell. Replaces every rail row when present.",
                    "example": [
                      {
                        "cells": [
                          "news"
                        ]
                      }
                    ]
                  },
                  "settings": {
                    "type": "array",
                    "nullable": true,
                    "description": "Widget settings keyed by placement key. Replaces the owner's whole set when present. Each value is stored and served back verbatim. Two placed copies of the same widget cannot have equal settings; a further copy no cell places is dropped.",
                    "example": {
                      "sales.sales_by_day": {
                        "days": 7,
                        "graphType": "bar"
                      },
                      "sales.sales_by_day#2": {
                        "days": 30,
                        "graphType": "line"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored employee layout",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DashboardLayoutOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sessions": {
      "get": {
        "summary": "List active sessions",
        "description": "Active sessions of the tenant plus license slot counters. IP, session start and last action are only returned to users holding outros:forcelogout.",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\SessionPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Active sessions and counters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ActiveSessionsOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sessions/{sessionId}": {
      "delete": {
        "summary": "Force logout of a session",
        "description": "Terminates the given session. Idempotent: returns 204 even when the session no longer exists, because the legacy killer cannot distinguish a missing session from a Redis scan failure.",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\SessionPolicy",
          "ability": "forceLogout",
          "privileges": [
            "outros:forcelogout"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session terminated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/claims": {
      "get": {
        "summary": "List workshop claims",
        "description": "Returns a paginated list of insurance claims with status, vehicle and customer details.",
        "tags": [
          "Workshop",
          "Claims"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Claim\\Policies\\ClaimPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:sinistros"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix - for DESC). Allowed: id, claim_date, report_date, status_id, created_at",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "status_id",
            "in": "query",
            "required": false,
            "description": "Filter by claim status ID (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate (eq, ct, sw)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "insurer_id",
            "in": "query",
            "required": false,
            "description": "Filter by insurer ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "process_number",
            "in": "query",
            "required": false,
            "description": "Filter by insurance process number (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "claim_date",
            "in": "query",
            "required": false,
            "description": "Filter by claim date (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Free text search on process number and plate",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[status_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[status_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[insurer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[insurer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[process_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[process_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[claim_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[claim_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClaimOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create workshop claim",
        "description": "Creates an insurance claim for a vehicle. The customer defaults to the vehicle owner when omitted.",
        "tags": [
          "Workshop",
          "Claims"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Claim\\Policies\\ClaimPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:sinistros:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "description": "Vehicle plate."
                  },
                  "status_id": {
                    "type": "number",
                    "description": "Claim status ID."
                  },
                  "warehouse_id": {
                    "type": "number",
                    "description": "Warehouse code."
                  },
                  "process_number": {
                    "type": "string",
                    "maxLength": 25,
                    "description": "Insurance process number."
                  },
                  "customer_id": {
                    "type": "number",
                    "description": "Customer code. Defaults to the vehicle owner."
                  },
                  "insurer_id": {
                    "type": "number",
                    "description": "Insurer ID."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Short label shown as the designation column of the claims list."
                  },
                  "description": {
                    "type": "string",
                    "description": "Claim description."
                  },
                  "repair_days": {
                    "type": "number",
                    "description": "Estimated repair days."
                  },
                  "claim_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Claim date in Y-m-d format."
                  },
                  "report_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Report date in Y-m-d format."
                  },
                  "expected_entry_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Expected vehicle entry date in Y-m-d format."
                  },
                  "expected_service_order_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Expected service order date in Y-m-d format."
                  }
                },
                "required": [
                  "plate",
                  "status_id",
                  "warehouse_id",
                  "process_number"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClaimOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/monitor": {
      "get": {
        "summary": "Workshop monitor",
        "description": "Returns a paginated list of service orders with interventions, active mechanics, vehicle details and completion tracking for the workshop control panel.",
        "tags": [
          "Workshop",
          "Monitor"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Monitor\\Policies\\MonitorPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "num",
            "in": "query",
            "required": false,
            "description": "Filter by service order number (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status code (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Filter by date (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "vehicle_plate",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoice_name",
            "in": "query",
            "required": false,
            "description": "Filter by invoice name (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_delivery_date",
            "in": "query",
            "required": false,
            "description": "Filter by expected delivery date (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "awaiting_parts",
            "in": "query",
            "required": false,
            "description": "Filter by awaiting parts flag, true/false or 1/0 (eq)",
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "description": "Filter by department ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "description": "Filter by priority (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "start_hour",
            "in": "query",
            "required": false,
            "description": "Working hours start (HH:MM, default 09:00)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_hour",
            "in": "query",
            "required": false,
            "description": "Working hours end (HH:MM, default 18:30)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_hour_lunch",
            "in": "query",
            "required": false,
            "description": "Lunch break start (HH:MM, default 13:00)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_hour_lunch",
            "in": "query",
            "required": false,
            "description": "Lunch break end (HH:MM, default 14:30)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip_weekends",
            "in": "query",
            "required": false,
            "description": "Skip weekends in calculation, true/false or 1/0 (default true)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix - for DESC). Allowed: num, date, status, vehicle_plate, expected_delivery_date, priority",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[num][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[num][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[status][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[status][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[vehicle_plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[vehicle_plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[invoice_name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[invoice_name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[expected_delivery_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[expected_delivery_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[awaiting_parts][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[awaiting_parts][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[department][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[department][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[priority][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[priority][eq]=value",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitorOutputDto"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/monitor/service-orders": {
      "get": {
        "summary": "Service orders monitor",
        "description": "Returns active service orders (ESP/EXE/MAR states) with interventions, mechanics, budgets, badge urgency color and completion tracking.",
        "tags": [
          "Workshop",
          "Monitor"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Monitor\\Policies\\MonitorPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "num",
            "in": "query",
            "required": false,
            "description": "Filter by service order number (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "description": "Filter by document number (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by status code (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Filter by date (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "vehicle_plate",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoice_name",
            "in": "query",
            "required": false,
            "description": "Filter by invoice name (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_delivery_date",
            "in": "query",
            "required": false,
            "description": "Filter by expected delivery date (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "awaiting_parts",
            "in": "query",
            "required": false,
            "description": "Filter by awaiting parts flag, true/false or 1/0 (eq)",
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "description": "Filter by priority (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "start_hour",
            "in": "query",
            "required": false,
            "description": "Working hours start (HH:MM, default 09:00)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_hour",
            "in": "query",
            "required": false,
            "description": "Working hours end (HH:MM, default 18:30)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_hour_lunch",
            "in": "query",
            "required": false,
            "description": "Lunch break start (HH:MM, default 13:00)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_hour_lunch",
            "in": "query",
            "required": false,
            "description": "Lunch break end (HH:MM, default 14:30)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip_weekends",
            "in": "query",
            "required": false,
            "description": "Skip weekends in calculation, true/false or 1/0 (default true)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix - for DESC). Allowed: num, date, status, vehicle_plate, expected_delivery_date, priority",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[num][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[num][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[status][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[status][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[vehicle_plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[vehicle_plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[invoice_name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[invoice_name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[expected_delivery_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[expected_delivery_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[awaiting_parts][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[awaiting_parts][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[priority][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[priority][eq]=value",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitorServiceOrderOutputDto"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/claims/statuses": {
      "get": {
        "summary": "List workshop claim statuses",
        "description": "Returns the configured insurance claim statuses in display order.",
        "tags": [
          "Workshop",
          "Claims"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Claim\\Policies\\ClaimPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:sinistros"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClaimStatusOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/claims/{claim}": {
      "get": {
        "summary": "Show workshop claim details",
        "description": "Returns detailed information about a specific insurance claim, including status, vehicle and customer.",
        "tags": [
          "Workshop",
          "Claims"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Claim\\Policies\\ClaimPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:sinistros"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "claim",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClaimOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/sellers": {
      "get": {
        "summary": "List sellers",
        "description": "Returns sellers with optional filtering by identification and address fields. Supports limit-based pagination.",
        "tags": [
          "Entities",
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades:comerciais"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by seller name.",
            "example": "Silva",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "cellphone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Filter by email address.",
            "example": "comercial@empresa.pt",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tax_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "commission_type_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3,
              "minLength": 2
            },
            "deprecated": true
          },
          {
            "name": "team_code",
            "in": "query",
            "required": false,
            "description": "Filter by team code.",
            "example": 1,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "classification_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 6
            },
            "deprecated": true
          },
          {
            "name": "campaign_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 12
            },
            "deprecated": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Filter by active status.",
            "example": true,
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "operator",
            "in": "query",
            "required": false,
            "description": "Default operator for simple filters (eq, ct, like, sw, ew).",
            "example": "ct",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[locale][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[locale][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[phone2][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cellphone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[cellphone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[email][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[email][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[tax_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[commission_type_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[commission_type_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[team_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[team_code][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[classification_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[classification_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[campaign_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters using filter[field][operator]=value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SellerOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create new seller",
        "description": "Creates a seller with legal, address and contact data.",
        "tags": [
          "Entities",
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "create",
          "privileges": [
            "entidades:comerciais:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Full name or company name.",
                    "example": "Comercial Silva Lda"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Primary address.",
                    "example": "Rua do Comercio, 123"
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 4,
                    "description": "Postal/ZIP code.",
                    "example": "1000-001"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 30,
                    "description": "Email address (required, max 30 chars).",
                    "example": "comercial@empresa.pt"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Landline phone number.",
                    "example": "212345678"
                  },
                  "locale": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "City / locality.",
                    "example": "Lisboa"
                  },
                  "tax_number": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Tax identification number (NIF).",
                    "example": "999999990"
                  },
                  "national_identity_card": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "cellphone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "login": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "password": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 8
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "Free-text observations.",
                    "example": "Seller note."
                  },
                  "team_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "classification_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6
                  },
                  "campaign_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6
                  },
                  "commission_type_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6
                  },
                  "bank_account_number": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 50
                  },
                  "council_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "district_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "active": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "rgdp_allow_mailing": {
                    "type": "boolean"
                  },
                  "rgdp_allow_date_processing_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "rgdp_signature": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  }
                },
                "required": [
                  "name",
                  "address",
                  "postal_code",
                  "country_code",
                  "email",
                  "locale"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SellerOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/sellers/{seller}": {
      "get": {
        "summary": "Get seller by ID",
        "description": "Returns detailed information for a specific seller including address and location data.",
        "tags": [
          "Entities",
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:comerciais:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "seller",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SellerOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update seller",
        "description": "Updates seller fields sent in the request payload. All fields are optional.",
        "tags": [
          "Entities",
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "update",
          "privileges": [
            "entidades:comerciais:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "seller",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Full name or company name.",
                    "example": "Comercial Silva Lda"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "locale": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email",
                    "maxLength": 30,
                    "description": "Email address (max 30 chars).",
                    "example": "comercial@empresa.pt"
                  },
                  "tax_number": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "national_identity_card": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "cellphone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "login": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "password": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 8
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "Free-text observations.",
                    "example": "Updated note."
                  },
                  "team_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "classification_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6
                  },
                  "campaign_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6
                  },
                  "commission_type_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6
                  },
                  "bank_account_number": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 50
                  },
                  "council_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "district_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "rgdp_allow_mailing": {
                    "type": "boolean"
                  },
                  "rgdp_allow_date_processing_at": {
                    "type": "string",
                    "nullable": true
                  },
                  "rgdp_signature": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SellerOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete seller",
        "description": "Deletes a seller by ID.",
        "tags": [
          "Entities",
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "delete",
          "privileges": [
            "entidades:comerciais:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "seller",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Seller deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/sellers/{seller}/zones": {
      "get": {
        "summary": "List seller zones",
        "description": "Returns the sales zones assigned to the seller.",
        "tags": [
          "Entities",
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:comerciais:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "seller",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SellerZoneOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/sellers/{seller}/contacts": {
      "get": {
        "summary": "List seller contacts",
        "description": "Returns a paginated list of contacts associated with the seller.",
        "tags": [
          "Entities",
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:comerciais:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "seller",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[contact_type]",
            "in": "query",
            "required": false,
            "description": "Filter by contact type (e.g. email, phone, mobile).",
            "example": "email",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[contact]",
            "in": "query",
            "required": false,
            "description": "Filter by contact value.",
            "example": "seller@empresa.pt",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[preferential]",
            "in": "query",
            "required": false,
            "description": "Filter by preferential flag.",
            "example": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SellerContactOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/news/home": {
      "get": {
        "summary": "Get home news feed",
        "description": "Returns the OfficeGest news feed for the home screen, filtered by tenant license, modules and language. Cached server-side for one hour.",
        "tags": [
          "News"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Home news items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HomeNewsOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/receipts/{type}": {
      "get": {
        "summary": "List receipts by type",
        "description": "Returns a paginated list of receipts filtered by receipt type with optional filters.",
        "tags": [
          "Sales",
          "Receipts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Receipts\\Policies\\ReceiptPolicy",
          "ability": "view",
          "privileges": [
            "vendas:{type}:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "total",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "paid_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "system_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "relation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[number][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by receipt number (eq) Operators: eq. Example: filter[number][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[total][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by total amount (gte, lte, eq) Operators: gte, lte, eq. Example: filter[total][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[paid_value][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by paid value (gte, lte, eq) Operators: gte, lte, eq. Example: filter[paid_value][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[state][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by receipt state (eq) Operators: eq. Example: filter[state][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by receipt date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[system_date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by system date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[system_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[relation][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by customer relation (eq, ct, sw, ew) Operators: eq, ct, sw, ew. Example: filter[relation][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by last update date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter parameters",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GetReceiptDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Receipt type not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create receipt",
        "description": "Creates a new receipt associating it with existing documents.",
        "tags": [
          "Sales",
          "Receipts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Receipts\\Policies\\ReceiptPolicy",
          "ability": "create",
          "privileges": [
            "vendas:{type}:new"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idcustomer": {
                    "type": "integer",
                    "description": "Customer internal ID"
                  },
                  "serie": {
                    "type": "string",
                    "description": "Receipt serie code"
                  },
                  "date": {
                    "type": "string",
                    "description": "Receipt date"
                  },
                  "paymentmethod": {
                    "type": "string",
                    "description": "Payment method code"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Currency code"
                  },
                  "cashregister": {
                    "type": "integer",
                    "description": "Cash register number; defaults to the user cash register"
                  },
                  "observations": {
                    "type": "string",
                    "description": "Receipt observations"
                  },
                  "num_serie_ext": {
                    "type": "string",
                    "description": "External serie number (required for manual/duplicate series)"
                  },
                  "serie_ext": {
                    "type": "string",
                    "description": "External serie code (required for manual/duplicate series)"
                  },
                  "type_serie_ext": {
                    "type": "string",
                    "description": "External serie type (required for duplicate series)"
                  },
                  "systemdate": {
                    "type": "string",
                    "description": "System date (required for import series)"
                  },
                  "documentnumber": {
                    "type": "string",
                    "description": "Document number (required for import series)"
                  },
                  "sendemail": {
                    "type": "string",
                    "enum": [
                      "1",
                      "T",
                      "F"
                    ],
                    "description": "Send email flag"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Destination email address"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "documentnumber": {
                          "type": "integer",
                          "description": "Source document number"
                        },
                        "documenttype": {
                          "type": "string",
                          "description": "Source document type code"
                        },
                        "valuetopay": {
                          "type": "number",
                          "description": "Amount to pay for this document line"
                        }
                      },
                      "required": [
                        "documentnumber",
                        "documenttype"
                      ]
                    },
                    "description": "Documents to settle"
                  },
                  "paymenttype": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "description": "Payment amount"
                        },
                        "date": {
                          "type": "string",
                          "description": "Payment date"
                        },
                        "bank": {
                          "type": "string",
                          "description": "Bank code"
                        },
                        "accountbank": {
                          "type": "string",
                          "description": "Bank account code"
                        },
                        "number": {
                          "type": "string",
                          "description": "Payment reference number"
                        }
                      }
                    },
                    "description": "Payment type breakdown"
                  },
                  "lines.*.documentnumber": {
                    "type": "integer",
                    "description": "Source document number"
                  },
                  "lines.*.documenttype": {
                    "type": "string",
                    "description": "Source document type code"
                  },
                  "lines.*.valuetopay": {
                    "type": "number",
                    "description": "Amount to pay for this document line"
                  },
                  "paymenttype.*.value": {
                    "type": "number",
                    "description": "Payment amount"
                  },
                  "paymenttype.*.date": {
                    "type": "string",
                    "description": "Payment date"
                  },
                  "paymenttype.*.bank": {
                    "type": "string",
                    "description": "Bank code"
                  },
                  "paymenttype.*.accountbank": {
                    "type": "string",
                    "description": "Bank account code"
                  },
                  "paymenttype.*.number": {
                    "type": "string",
                    "description": "Payment reference number"
                  }
                },
                "required": [
                  "idcustomer",
                  "lines",
                  "lines.*.documentnumber",
                  "lines.*.documenttype"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateReceiptDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Receipt refused. `message` names the line and document; `field` is the offending input (e.g. `lines.0`); `reason` is a stable code when a line was refused (DOCUMENT_NOT_FOUND, CUSTOMER_MISMATCH, DOCUMENT_CANCELLED, DOCUMENT_NOT_OPEN, DOCUMENT_TYPE_NOT_ALLOWED, NOTHING_PENDING, VALUE_EXCEEDS_PENDING); `codeerror` carries the receipt engine error otherwise.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/drafts/{type}": {
      "get": {
        "summary": "List drafts by type",
        "description": "Returns a paginated list of drafts for a given document type with optional filters.",
        "tags": [
          "Sales",
          "Drafts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DraftPolicy",
          "ability": "view",
          "privileges": [
            "vendas:{type}:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "system_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "due_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "date_state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "total",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "total_without_vat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "vat_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "paid_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "discount_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "discount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "discount_2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "relation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "cash_vat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "teccom_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "pwm_process_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "insurer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "filter[number][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by draft number (eq) Operators: eq. Example: filter[number][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by serie (eq, sw, ew, ct) Operators: eq, sw, ew, ct. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by customer ID (eq) Operators: eq. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[state][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[state][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[system_date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by system date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[system_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[due_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[due_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[date_state][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[date_state][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by last update date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[total][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by total amount (gte, lte, eq) Operators: gte, lte, eq. Example: filter[total][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[total_without_vat][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[total_without_vat][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[vat_value][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vat_value][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[paid_value][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[paid_value][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount_value][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[discount_value][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[discount][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount_2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[discount_2][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate (sw, ew, ct, eq) - requires OFICINAS module Operators: sw, ew, ct, eq. Example: filter[plate][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[relation][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[relation][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[cash_vat][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[cash_vat][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[teccom_status][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[teccom_status][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[pwm_process_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[pwm_process_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[insurer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[insurer_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter parameters",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GetDraftDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Draft type not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create sales draft",
        "description": "Creates a sales draft with lines, optional payment and address information.",
        "tags": [
          "Sales",
          "Drafts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DraftPolicy",
          "ability": "create",
          "privileges": [
            "vendas:{type}:new"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "description": "Customer internal ID"
                  },
                  "customer_tax_id": {
                    "type": "string",
                    "description": "Customer tax identification number (resolves or creates customer)"
                  },
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Document date (Y-m-d)"
                  },
                  "discount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Global discount percentage (0-100)"
                  },
                  "discount_2": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Secondary global discount percentage (0-100)"
                  },
                  "serie": {
                    "type": "string",
                    "description": "Document serie code"
                  },
                  "payment_method": {
                    "type": "string",
                    "description": "Payment method code"
                  },
                  "paymenttype": {
                    "type": "array",
                    "description": "Payment type breakdown"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Currency code"
                  },
                  "delivery_mode": {
                    "type": "string",
                    "description": "Delivery mode code"
                  },
                  "commission_type": {
                    "type": "string",
                    "description": "Commission type code"
                  },
                  "observations": {
                    "type": "string",
                    "description": "Document observations"
                  },
                  "internal_observations": {
                    "type": "string",
                    "description": "Internal observations (not visible to customer)"
                  },
                  "address_invoice_id": {
                    "type": "integer",
                    "description": "Invoice address ID"
                  },
                  "address_delivery_id": {
                    "type": "integer",
                    "description": "Delivery address ID"
                  },
                  "address_shipping_id": {
                    "type": "integer",
                    "description": "Shipping/load address ID"
                  },
                  "invoice_address": {
                    "type": "string",
                    "description": "Invoice address text"
                  },
                  "invoice_city": {
                    "type": "string",
                    "description": "Invoice city"
                  },
                  "invoice_zipcode": {
                    "type": "string",
                    "description": "Invoice zip code"
                  },
                  "invoice_country": {
                    "type": "string",
                    "description": "Invoice country"
                  },
                  "delivery_address": {
                    "type": "string",
                    "description": "Delivery address text"
                  },
                  "delivery_city": {
                    "type": "string",
                    "description": "Delivery city"
                  },
                  "delivery_zipcode": {
                    "type": "string",
                    "description": "Delivery zip code"
                  },
                  "delivery_country": {
                    "type": "string",
                    "description": "Delivery country"
                  },
                  "load_address": {
                    "type": "string",
                    "description": "Load/shipping address text"
                  },
                  "load_city": {
                    "type": "string",
                    "description": "Load/shipping city"
                  },
                  "load_zipcode": {
                    "type": "string",
                    "description": "Load/shipping zip code"
                  },
                  "load_country": {
                    "type": "string",
                    "description": "Load/shipping country"
                  },
                  "plate": {
                    "type": "string",
                    "description": "Vehicle plate (requires OFICINAS module)"
                  },
                  "vehicle": {
                    "type": "string",
                    "description": "Vehicle reference"
                  },
                  "current_km": {
                    "type": "number",
                    "description": "Current vehicle kilometers (requires OFICINAS module)"
                  },
                  "campaign_code": {
                    "type": "string",
                    "description": "Campaign code (requires CRM module)"
                  },
                  "business_opportunity": {
                    "type": "string",
                    "description": "Business opportunity ID (requires CRM module)"
                  },
                  "reference": {
                    "type": "string",
                    "description": "External reference"
                  },
                  "relation": {
                    "type": "string",
                    "description": "Related entity reference"
                  },
                  "entry_store_id": {
                    "type": "number"
                  },
                  "pwm_process_id": {
                    "type": "number"
                  },
                  "mms_occurrence": {
                    "type": "string"
                  },
                  "number_on_supplier": {
                    "type": "string"
                  },
                  "origin": {
                    "type": "string",
                    "description": "Document origin"
                  },
                  "id_web": {
                    "type": "string",
                    "description": "Web order ID"
                  },
                  "cash_register": {
                    "type": "string",
                    "description": "Cash register code"
                  },
                  "payment_term": {
                    "type": "string",
                    "description": "Payment term code"
                  },
                  "vendor_code": {
                    "type": "string",
                    "description": "Vendor/salesperson code"
                  },
                  "num_serie_ext": {
                    "type": "string",
                    "description": "External serie number (required for manual/duplicate/import series)"
                  },
                  "serie_ext": {
                    "type": "string",
                    "description": "External serie code (required for manual/duplicate/import series)"
                  },
                  "type_serie_ext": {
                    "type": "string",
                    "description": "External serie type (required for duplicate series)"
                  },
                  "systemdate": {
                    "type": "string",
                    "description": "System date (required for import series)"
                  },
                  "hash": {
                    "type": "string",
                    "description": "Document hash (required for import series)"
                  },
                  "hash_control": {
                    "type": "string",
                    "description": "Hash control (required for import series)"
                  },
                  "document_number": {
                    "type": "string",
                    "description": "Document number (required for import series)"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "article_id": {
                          "type": "string",
                          "description": "Article code"
                        },
                        "quantity": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "description": "Line quantity (must be greater than 0)"
                        },
                        "selling_price": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Selling price without VAT"
                        },
                        "selling_price_with_vat": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Selling price with VAT"
                        },
                        "vat_id": {
                          "type": "string",
                          "description": "VAT code override"
                        },
                        "vat_exemption_code": {
                          "type": "string",
                          "description": "VAT exemption reason code (required when VAT is 0)"
                        },
                        "number_ori": {
                          "type": "number",
                          "description": "Origin document number"
                        },
                        "type_ori": {
                          "type": "string",
                          "description": "Origin document type"
                        },
                        "line_ori": {
                          "type": "number",
                          "description": "Origin document line number"
                        },
                        "id_lproc_comp": {
                          "type": "number"
                        },
                        "plate": {
                          "type": "string",
                          "description": "Line-level vehicle plate"
                        },
                        "store": {
                          "type": "string",
                          "description": "Warehouse/store code"
                        },
                        "lote": {
                          "type": "string",
                          "description": "Batch/lot number"
                        },
                        "codigo_ler": {
                          "type": "string"
                        },
                        "cod_centrocusto": {
                          "type": "string",
                          "description": "Cost center code"
                        },
                        "id_classifcontab": {
                          "type": "number",
                          "description": "Accounting classification ID"
                        },
                        "conjunto": {
                          "type": "number"
                        },
                        "extra_field_l_i1": {
                          "type": "number"
                        },
                        "extra_field_l_i2": {
                          "type": "number"
                        },
                        "extra_field_l_v1": {
                          "type": "string"
                        },
                        "extra_field_l_v2": {
                          "type": "string"
                        },
                        "extra_field_l_d1": {
                          "type": "number"
                        },
                        "extra_field_l_d2": {
                          "type": "number"
                        },
                        "extra_field_l_dt1": {
                          "type": "string"
                        },
                        "extra_field_l_dt2": {
                          "type": "string"
                        },
                        "load_articles_complementary": {
                          "type": "number"
                        },
                        "discount_2": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "discount_3": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "discount_4": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "discount_5": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "article_id",
                        "quantity"
                      ]
                    },
                    "description": "Document lines"
                  },
                  "lines.*.article_id": {
                    "type": "string",
                    "description": "Article code"
                  },
                  "lines.*.quantity": {
                    "type": "number",
                    "description": "Line quantity (must be greater than 0)"
                  },
                  "lines.*.selling_price": {
                    "type": "number",
                    "description": "Selling price without VAT"
                  },
                  "lines.*.selling_price_with_vat": {
                    "type": "number",
                    "description": "Selling price with VAT"
                  },
                  "lines.*.vat_id": {
                    "type": "string",
                    "description": "VAT code override"
                  },
                  "lines.*.vat_exemption_code": {
                    "type": "string",
                    "description": "VAT exemption reason code (required when VAT is 0)"
                  },
                  "lines.*.number_ori": {
                    "type": "number",
                    "description": "Origin document number"
                  },
                  "lines.*.type_ori": {
                    "type": "string",
                    "description": "Origin document type"
                  },
                  "lines.*.line_ori": {
                    "type": "number",
                    "description": "Origin document line number"
                  },
                  "lines.*.plate": {
                    "type": "string",
                    "description": "Line-level vehicle plate"
                  },
                  "lines.*.store": {
                    "type": "string",
                    "description": "Warehouse/store code"
                  },
                  "lines.*.lote": {
                    "type": "string",
                    "description": "Batch/lot number"
                  },
                  "lines.*.cod_centrocusto": {
                    "type": "string",
                    "description": "Cost center code"
                  },
                  "lines.*.id_classifcontab": {
                    "type": "number",
                    "description": "Accounting classification ID"
                  }
                },
                "required": [
                  "lines",
                  "lines.*.article_id",
                  "lines.*.quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GetDraftDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Draft type not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation or business rule error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/receipts": {
      "get": {
        "summary": "List available receipt types",
        "description": "Returns all available receipt types configured in the system.",
        "tags": [
          "Sales",
          "Receipts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Receipts\\Policies\\ReceiptPolicy",
          "ability": "viewAny",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like. Example: filter[description][like]=value",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of available receipt types.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/receipts/{type}/{id}": {
      "get": {
        "summary": "Get receipt by ID",
        "description": "Returns a single receipt by its ID with optional print/email options.",
        "tags": [
          "Sales",
          "Receipts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Receipts\\Policies\\ReceiptPolicy",
          "ability": "view",
          "privileges": [
            "vendas:{type}:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "print",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "T",
                "O"
              ]
            }
          },
          {
            "name": "sendemail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "T",
                "F"
              ]
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GetReceiptDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/drafts": {
      "get": {
        "summary": "List draft document types",
        "description": "Returns all available sales document types that support draft mode.",
        "tags": [
          "Sales",
          "Drafts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DraftPolicy",
          "ability": "viewAny",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "List of available draft document types.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/drafts/{type}/{id}": {
      "get": {
        "summary": "Get draft by ID",
        "description": "Returns a single draft with its lines. Supports optional PDF URL generation.",
        "tags": [
          "Sales",
          "Drafts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DraftPolicy",
          "ability": "view",
          "privileges": [
            "vendas:{type}:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "print",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "T",
                "O"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GetDraftDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Draft not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete sales draft",
        "description": "Permanently deletes a sales draft and all associated data.",
        "tags": [
          "Sales",
          "Drafts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DraftPolicy",
          "ability": "delete",
          "privileges": [
            "vendas:{type}:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Draft deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Draft not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/receipts/{type}/{id}/cancel": {
      "patch": {
        "summary": "Cancel receipt",
        "description": "Voids a receipt with a mandatory reason for audit trail.",
        "tags": [
          "Sales",
          "Receipts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Receipts\\Policies\\ReceiptPolicy",
          "ability": "delete",
          "privileges": [
            "vendas:{type}:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason_id": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Receipt cancelled successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Receipt not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/processes": {
      "get": {
        "summary": "List workshop processes",
        "description": "Returns a paginated list of workshop processes with vehicle, owner and customer details.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:processos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate (eq, ct, sw)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status_id",
            "in": "query",
            "required": false,
            "description": "Filter by process status ID (eq, in)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by billing customer ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "owner_customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle owner customer ID (eq)",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by registration date (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "is_closing_status",
            "in": "query",
            "required": false,
            "description": "Filter by closing status flag, true/false or 1/0 (eq)",
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Free text search on plate",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix - for DESC). Allowed: id,\n                plate,\n                created_at,\n                status_id,\n                km_counter",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[status_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[status_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[owner_customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[owner_customer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[is_closing_status][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[is_closing_status][eq]=value",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderProcessOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create workshop process",
        "description": "Creates a new workshop process with vehicle, customer, optional interventions and photos.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:processos:create"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "description": "Vehicle plate."
                  },
                  "customer_id": {
                    "type": "number",
                    "description": "Customer code."
                  },
                  "km_counter": {
                    "type": "number",
                    "description": "Current odometer value."
                  },
                  "observations": {
                    "type": "string",
                    "description": "General observations."
                  },
                  "reception_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Reception date in Y-m-d H:i:s format."
                  },
                  "expected_delivery_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Expected delivery date in Y-m-d H:i:s format."
                  },
                  "warehouse_id": {
                    "type": "string",
                    "description": "Warehouse code."
                  },
                  "signature": {
                    "type": "string",
                    "description": "Base64-encoded signature image."
                  },
                  "signature_holder": {
                    "type": "string",
                    "description": "Signature holder name."
                  },
                  "interventions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Valid value from TiposIntervencao.id."
                        }
                      }
                    },
                    "description": "Intervention types to associate with the process."
                  }
                },
                "required": [
                  "plate"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderProcessOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/processes/{process}/parts": {
      "post": {
        "summary": "Add parts to workshop process",
        "description": "Adds one or more articles/parts to an existing workshop process. Supports legacy field aliases.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:processos:create"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "articles": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "article_id": {
                          "type": "string",
                          "description": "Article reference code. Legacy alias: artnr",
                          "example": "REF001"
                        },
                        "quantity": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "description": "Quantity to add. Must be greater than 0",
                          "example": 2
                        },
                        "selling_price": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Unit selling price. Legacy aliases: sellingprice, sellingpice",
                          "example": 15.5
                        },
                        "designation": {
                          "type": "string",
                          "description": "Article description. Legacy alias: design",
                          "example": "Oil filter"
                        },
                        "subfamily": {
                          "type": "string",
                          "description": "Article subfamily. Legacy alias: lprod",
                          "example": "FILTERS"
                        },
                        "generic_article_number": {
                          "type": "string",
                          "description": "Generic article number (TecDoc). Legacy alias: genartnr",
                          "example": "1234"
                        }
                      },
                      "required": [
                        "article_id",
                        "quantity"
                      ]
                    },
                    "description": "Array of articles to add to the process",
                    "example": [
                      {
                        "article_id": "REF001",
                        "quantity": 2,
                        "selling_price": 15.5
                      }
                    ]
                  },
                  "articles.*.article_id": {
                    "type": "string",
                    "description": "Article reference code. Legacy alias: artnr",
                    "example": "REF001"
                  },
                  "articles.*.quantity": {
                    "type": "string",
                    "description": "Quantity to add. Must be greater than 0",
                    "example": 2
                  },
                  "articles.*.selling_price": {
                    "type": "string",
                    "description": "Unit selling price. Legacy aliases: sellingprice, sellingpice",
                    "example": 15.5
                  },
                  "articles.*.designation": {
                    "type": "string",
                    "description": "Article description. Legacy alias: design",
                    "example": "Oil filter"
                  },
                  "articles.*.subfamily": {
                    "type": "string",
                    "description": "Article subfamily. Legacy alias: lprod",
                    "example": "FILTERS"
                  },
                  "articles.*.generic_article_number": {
                    "type": "string",
                    "description": "Generic article number (TecDoc). Legacy alias: genartnr",
                    "example": "1234"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AddProcessPartsOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/processes/{process}/brightmotive": {
      "post": {
        "summary": "Sync Brightmotive data",
        "description": "Synchronizes parts and interventions from Brightmotive integration. Handles insert, update and delete of parts and interventions\n        based on workorder data.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:processos:create"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workorder_id": {
                    "type": "string",
                    "description": "Brightmotive workorder ID"
                  },
                  "parts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "codartigo": {
                          "type": "string"
                        },
                        "brightmotive_line_id": {
                          "type": "string"
                        },
                        "qty": {
                          "type": "number"
                        },
                        "price": {
                          "type": "number"
                        },
                        "description": {
                          "type": "string"
                        },
                        "family": {
                          "type": "string"
                        },
                        "subfamily": {
                          "type": "string"
                        },
                        "brand": {
                          "type": "string"
                        },
                        "codiva": {
                          "type": "string"
                        },
                        "codrazaoisencao": {
                          "type": "string"
                        },
                        "tecdoc_code": {
                          "type": "string"
                        },
                        "extradescription": {
                          "type": "string"
                        },
                        "surcharges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "codartigo": {
                                "type": "string"
                              },
                              "brightmotive_line_id": {
                                "type": "string"
                              },
                              "qty": {
                                "type": "number"
                              },
                              "price": {
                                "type": "number"
                              },
                              "mult_qtd": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "family": {
                                "type": "string"
                              },
                              "subfamily": {
                                "type": "string"
                              },
                              "brand": {
                                "type": "string"
                              },
                              "codiva": {
                                "type": "string"
                              },
                              "codrazaoisencao": {
                                "type": "string"
                              },
                              "tecdoc_code": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "description": "Parts to sync. Empty array deletes all parts for this workorder."
                  },
                  "interventions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "brightmotive_line_id": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "qty": {
                          "type": "number"
                        },
                        "hours": {
                          "type": "number"
                        },
                        "minutes": {
                          "type": "number"
                        },
                        "price": {
                          "type": "number"
                        },
                        "id_iva": {
                          "type": "string"
                        }
                      }
                    },
                    "description": "Interventions to sync. Empty array deletes all interventions for this workorder."
                  }
                },
                "required": [
                  "workorder_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SyncBrightmotiveOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/processes/{process}/images": {
      "get": {
        "summary": "List workshop process images",
        "description": "Returns a paginated list of gallery images for a specific workshop process.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:processos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProcessImageOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upload image to workshop process",
        "description": "Uploads an image file to the workshop process gallery. Accepts JPEG and PNG formats.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:processos:create"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Image file (JPEG or PNG)"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Image description"
                  }
                },
                "required": [
                  "file",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessImageOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/processes/{process}/attachments": {
      "get": {
        "summary": "List workshop process attachments",
        "description": "Returns a paginated list of attachments for a specific workshop process.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:processos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProcessAttachmentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upload attachment to workshop process",
        "description": "Uploads a file attachment to the workshop process. Accepts any file type.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:processos:create"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File to attach (any type)"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Attachment description"
                  }
                },
                "required": [
                  "file",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessAttachmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/processes/statuses": {
      "get": {
        "summary": "List workshop process statuses",
        "description": "Returns a paginated list of process statuses with the count of processes per status.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:processos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProcessStatusOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/processes/{process}": {
      "get": {
        "summary": "Show workshop process details",
        "description": "Returns detailed information about a specific workshop process, including vehicle, owner and customer details.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Processes\\Policies\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:processos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderProcessOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/banks/reports/balances": {
      "get": {
        "summary": "Bank and cash balances",
        "description": "Returns the balance of every active bank account as of the end of the current server day, grouped by bank. Accounts flagged as cash accounts are returned with their cash registers and the split between notes/coins and received cheques; every other account carries its own ledger balance. An account with no opening date configured is reported as zero -- it is invisible to this report, its opening balance included. Amounts are never converted between currencies, so read each account currency before presenting a bank total as one figure. The endpoint takes no parameters: it answers the same question the legacy dashboard widget answers, and an empty groups array is a valid answer.",
        "tags": [
          "Banks",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Banks\\Reports\\Policies\\BankReportsPolicy",
          "ability": "viewBankBalances",
          "privileges": [
            "bancos",
            "relatorios:bancos:saldos"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget relatorios/bancos/saldos (dashboard.id=49), which is the composite \"bancos&relatorios:bancos:saldos\". The home dashboard splits that column on \"&\" and requires EVERY part, so both privileges are required here too -- checkPriv() itself does a literal match and would never clear the composite string on its own."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "The queried cut-off date and the balance tree, cash groups first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "as_of": {
                          "type": "string",
                          "description": "The cut-off date actually queried, Y-m-d, from the server clock. Title the card with it instead of deriving it from the browser clock."
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "cash",
                                  "bank"
                                ],
                                "description": "\"cash\" for accounts flagged conta_caixa=T, whose balance is the sum of their cash registers; \"bank\" for the rest, whose balance is their own ledger. The same bank can appear once per kind, as two separate groups."
                              },
                              "bank_id": {
                                "type": "string",
                                "description": "Bank code (bancos.CodBanco)."
                              },
                              "bank_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "Bank name. Null when the account points at a bank that no longer exists."
                              },
                              "total": {
                                "type": "number",
                                "description": "Sum of the group accounts, currency conversion included in none."
                              },
                              "accounts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "description": "Account code within the bank (contasbanc.CodContaBanc)."
                                    },
                                    "description": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Account description as configured."
                                    },
                                    "currency": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "ISO currency of the account (contasbanc.CodMoeda). Totals are NEVER converted: an account in another currency is added to its bank total as it stands, which is what the legacy widget has always shown. Read the currency before presenting a bank total as a single amount."
                                    },
                                    "total": {
                                      "type": "number",
                                      "description": "Balance of the account. Zero when the account has no opening date configured -- such an account is invisible to this report, opening balance included."
                                    },
                                    "cash_registers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "integer",
                                            "description": "Cash register number (caixas.NCaixa)."
                                          },
                                          "name": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "Cash register description. Null when the register carries none."
                                          },
                                          "cash": {
                                            "type": "number",
                                            "description": "Balance held in notes and coins, opening balance included."
                                          },
                                          "cheques": {
                                            "type": "number",
                                            "description": "Balance held in cheques that were received (Cheques.Estado = REC). The opening balance is NOT part of this figure: it belongs entirely to cash."
                                          },
                                          "total": {
                                            "type": "number",
                                            "description": "cash + cheques."
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "name",
                                          "cash",
                                          "cheques",
                                          "total"
                                        ]
                                      },
                                      "description": "Cash registers attached to the account, ascending by number. Present only on groups of kind \"cash\", and then possibly empty: a cash account with no register is a configured account that simply holds none."
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "description",
                                    "currency",
                                    "total"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "kind",
                              "bank_id",
                              "bank_name",
                              "total",
                              "accounts"
                            ]
                          },
                          "description": "Cash groups first, then bank groups, each in the order the legacy widget renders them (accounts ascending by description, banks by first appearance). Only ACTIVE accounts are listed. An empty array is a valid answer for a tenant with no configured account, never a 404."
                        }
                      },
                      "required": [
                        "as_of",
                        "groups"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/accounting/cost-centers": {
      "get": {
        "summary": "List cost centers",
        "description": "Returns a paginated list of cost centers with optional filtering.",
        "tags": [
          "Cost Centers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Accounting\\CostCenter\\Policies\\AccountingCostCenterPolicy",
          "ability": "viewAny",
          "privileges": [
            "contabilidade:centroscusto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[start_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[end_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AccountingCostCenterOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create cost center",
        "description": "Creates a new cost center with the provided data.",
        "tags": [
          "Cost Centers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Accounting\\CostCenter\\Policies\\AccountingCostCenterPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 15,
                    "description": "Cost center code (max 15 chars). Required on creation."
                  },
                  "name": {
                    "type": "string",
                    "description": "Cost center name."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the cost center is active."
                  },
                  "start_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date",
                    "description": "Validity start date."
                  },
                  "end_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date",
                    "description": "Validity end date (must be >= start_date)."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AccountingCostCenterOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/accounting/cost-centers/{costCenter}": {
      "get": {
        "summary": "Get cost center by ID",
        "description": "Returns detailed information for a specific cost center.",
        "tags": [
          "Cost Centers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Accounting\\CostCenter\\Policies\\AccountingCostCenterPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "costCenter",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AccountingCostCenterOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update cost center",
        "description": "Updates an existing cost center with the provided data.",
        "tags": [
          "Cost Centers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Accounting\\CostCenter\\Policies\\AccountingCostCenterPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "costCenter",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 15,
                    "description": "Cost center code (max 15 chars). Required on creation."
                  },
                  "name": {
                    "type": "string",
                    "description": "Cost center name."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the cost center is active."
                  },
                  "start_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date",
                    "description": "Validity start date."
                  },
                  "end_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date",
                    "description": "Validity end date (must be >= start_date)."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AccountingCostCenterOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/validate-login": {
      "post": {
        "summary": "Validate customer web login",
        "description": "Validates customer web login credentials. Returns validated=true with the customer ID on success, or validated=false on failure.\n        Always returns HTTP 200 regardless of credential validity.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 45
                  }
                },
                "required": [
                  "login",
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ValidateLoginOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers": {
      "get": {
        "summary": "List customers",
        "description": "Returns customers with optional filtering by identification, address and contact fields. Paginated by cursor: follow meta.next to the last page. Ordered by name, ties by id.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades:clientes"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Field to sort by, prefixed with - for descending. Ties are ordered by id in the same direction.",
            "example": "-name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Deprecated: use filter[name][eq|like|ct|sw|ew]. Filter by customer name.",
            "example": "Empresa",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3,
              "minLength": 2
            },
            "deprecated": true
          },
          {
            "name": "tax_id",
            "in": "query",
            "required": false,
            "description": "Deprecated: use filter[tax_id][eq]. Filter by tax identification number.",
            "example": "123456789",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "mobile_phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "fax",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "webpage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            },
            "deprecated": true
          },
          {
            "name": "classification_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 6
            },
            "deprecated": true
          },
          {
            "name": "campaign_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Deprecated: use filter[type][eq]. Filter by customer type.",
            "example": "E",
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "E",
                "I",
                "P"
              ]
            }
          },
          {
            "name": "gdpr_data_processing_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "gdpr_allow_mailing",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "activity_sector_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "client_manager_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "exemption_reason_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor taken from meta.next or meta.previous; omit it for the first page. A cursor that was changed, or that was issued for another sort, answers 422 INVALID_CURSOR. There are no page numbers: sending page answers 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "additional_fields",
            "in": "query",
            "required": false,
            "description": "Additional list fields to include in the response.",
            "example": "bank_id,discount,updated_at",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "get_final_customer",
            "in": "query",
            "required": false,
            "description": "Return only the configured final customer.",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "operator",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[phone2][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[mobile_phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[mobile_phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[fax][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[fax][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[email][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[email][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[webpage][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[webpage][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[entity_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[entity_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[classification_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[classification_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[campaign_code][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[type][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "E",
                "I",
                "P"
              ]
            }
          },
          {
            "name": "filter[gdpr_data_processing_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[gdpr_data_processing_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[gdpr_allow_mailing][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[gdpr_allow_mailing][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[activity_sector_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[activity_sector_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[client_manager_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[client_manager_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[exemption_reason_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[exemption_reason_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters using filter[field][operator]=value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[business_areas]",
            "in": "query",
            "required": false,
            "description": "Restrict to customers linked to any of the given CRM business area IDs. Requires the CRM module.",
            "example": [
              1,
              7
            ],
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EntitiesCustomerOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "cursor",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create new customer",
        "description": "Creates a customer with legal, address and contact data. Required and optional fields are declared by CustomerCreateRequest.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "create",
          "privileges": [
            "entidades:clientes:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Customer full name or company name.",
                    "example": "Empresa Exemplo Lda"
                  },
                  "tax_id": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Tax identification number (NIF).",
                    "example": "123456789"
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "Primary address.",
                    "example": "Rua das Flores, 123"
                  },
                  "address2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254,
                    "description": "Secondary address line.",
                    "example": "Bloco B"
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 4,
                    "description": "Postal/ZIP code.",
                    "example": "1000-001"
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254,
                    "description": "City name.",
                    "example": "Lisboa"
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email",
                    "maxLength": 254,
                    "description": "Primary email address (optional).",
                    "example": "contacto@empresa.pt"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Mobile phone number (optional).",
                    "example": "912345678"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Landline phone number.",
                    "example": "212345678"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "E",
                      "I",
                      "P"
                    ],
                    "description": "Customer type: E (Company), I (Company in Individual Name), P (Private Individual).",
                    "example": "E"
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Secondary phone number.",
                    "example": "212345679"
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Fax number.",
                    "example": "212345670"
                  },
                  "webpage": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254,
                    "description": "Website URL.",
                    "example": "https://example.com"
                  },
                  "commercial_designation": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254,
                    "description": "Commercial designation or trade name.",
                    "example": "Exemplo Comercial"
                  },
                  "vendor_code": {
                    "type": "number",
                    "nullable": true,
                    "description": "Salesperson/vendor code. Defaults to the authenticated user vendor if not provided.",
                    "example": 1
                  },
                  "classification_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6,
                    "description": "Customer classification code (up to 6 characters).",
                    "example": "CF"
                  },
                  "campaign_code": {
                    "type": "number",
                    "nullable": true,
                    "description": "Campaign code. Requires CRM module to be active.",
                    "example": 1
                  },
                  "zone_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 3,
                    "description": "Zone code.",
                    "example": "POM"
                  },
                  "payment_method_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Payment method ID.",
                    "example": 1
                  },
                  "latency_days": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 0,
                    "description": "Payment latency in days. Must be >= 0.",
                    "example": 30
                  },
                  "ceiling": {
                    "type": "number",
                    "description": "Credit ceiling.",
                    "example": 5000
                  },
                  "litigious": {
                    "type": "boolean",
                    "description": "Whether the customer is in litigation.",
                    "example": false
                  },
                  "activity_sector_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Activity sector ID.",
                    "example": 1
                  },
                  "client_manager_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Client manager (employee) ID.",
                    "example": 1
                  },
                  "exemption_reason_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "VAT exemption reason ID.",
                    "example": 1
                  },
                  "gdpr_allow_mailing": {
                    "type": "boolean",
                    "description": "Whether the customer allows mailing (GDPR).",
                    "example": true
                  },
                  "latitude": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Latitude coordinate.",
                    "example": "38.7169"
                  },
                  "longitude": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Longitude coordinate.",
                    "example": "-9.1399"
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000,
                    "description": "Free-text observations.",
                    "example": "Customer note."
                  },
                  "business_areas": {
                    "type": "array",
                    "nullable": true,
                    "description": "CRM business area IDs to link to the customer. Requires the CRM module.",
                    "example": [
                      1,
                      7
                    ]
                  }
                },
                "required": [
                  "name",
                  "tax_id",
                  "address",
                  "postal_code",
                  "city",
                  "country_code",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesCustomerOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/search": {
      "get": {
        "summary": "Search customers",
        "description": "Searches customers with advanced filters. Supports optional inclusion of alternate addresses via the addresses relation.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades:clientes"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3,
              "minLength": 2
            },
            "deprecated": true
          },
          {
            "name": "tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "phone2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "mobile_phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "fax",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20
            },
            "deprecated": true
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "webpage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 254
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            },
            "deprecated": true
          },
          {
            "name": "classification_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 6
            },
            "deprecated": true
          },
          {
            "name": "campaign_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "E",
                "I",
                "P"
              ]
            },
            "deprecated": true
          },
          {
            "name": "gdpr_data_processing_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "gdpr_allow_mailing",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "activity_sector_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "client_manager_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "exemption_reason_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "with_addresses",
            "in": "query",
            "required": false,
            "description": "Include alternate addresses relation in output. Enables address_filter.",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "address_filter",
            "in": "query",
            "required": false,
            "description": "Filter by alternate address fields via whereHas. Only effective when with_addresses=true.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_final_customer",
            "in": "query",
            "required": false,
            "description": "Exclude the configured final customer (VEND_CFinal).",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "additional_fields",
            "in": "query",
            "required": false,
            "description": "Additional fields to include in the response.",
            "example": "bank_id,discount,updated_at",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone2][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[phone2][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[mobile_phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[mobile_phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[fax][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[fax][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[email][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[email][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[webpage][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, ct, sw, ew. Example: filter[webpage][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[entity_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw, ew. Example: filter[entity_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[classification_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[classification_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[campaign_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[campaign_code][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[type][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "E",
                "I",
                "P"
              ]
            }
          },
          {
            "name": "filter[gdpr_data_processing_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[gdpr_data_processing_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[gdpr_allow_mailing][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[gdpr_allow_mailing][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[activity_sector_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[activity_sector_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[client_manager_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[client_manager_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[exemption_reason_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gt, gte, lt, lte, in. Example: filter[exemption_reason_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters using filter[field][operator]=value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerSearchOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}": {
      "get": {
        "summary": "Get customer by ID",
        "description": "Returns detailed information for a specific customer including address, contacts and location data.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:clientes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesCustomerOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update customer",
        "description": "Updates customer fields sent in the request payload. All fields are optional.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "update",
          "privileges": [
            "entidades:clientes:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "tax_id": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "E",
                      "I",
                      "P"
                    ]
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "address2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 2
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "format": "email",
                    "maxLength": 254
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "phone2": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "webpage": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  },
                  "commercial_designation": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 254
                  },
                  "vendor_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "classification_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 6
                  },
                  "campaign_code": {
                    "type": "number",
                    "nullable": true
                  },
                  "zone_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 3
                  },
                  "payment_method_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "latency_days": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 0
                  },
                  "ceiling": {
                    "type": "number"
                  },
                  "litigious": {
                    "type": "boolean"
                  },
                  "activity_sector_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "client_manager_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "exemption_reason_id": {
                    "type": "number",
                    "nullable": true
                  },
                  "gdpr_allow_mailing": {
                    "type": "boolean"
                  },
                  "latitude": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "longitude": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 1000
                  },
                  "business_areas": {
                    "type": "array",
                    "nullable": true,
                    "description": "CRM business area IDs the customer is linked to. Replaces the current set: an empty array removes every link, omitting the field leaves the current links untouched. Requires the CRM module.",
                    "example": [
                      1,
                      7
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitiesCustomerOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/franchise/connections": {
      "post": {
        "summary": "Create franchise connection",
        "description": "Creates a new franchise connection.",
        "tags": [
          "Franchise",
          "Connections"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Franchise\\Policies\\FranchiseConnectionPolicy",
          "ability": "create",
          "privileges": [
            "franchise",
            "franchise:franchisees"
          ],
          "notes": "Requires both Franchise and Franchise Franchisees privileges."
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "user": {
                    "type": "string"
                  },
                  "hash": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  }
                },
                "required": [
                  "url",
                  "user",
                  "hash",
                  "database"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FranchiseConnectionOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/franchise/execute-command": {
      "post": {
        "summary": "Execute franchise command",
        "description": "Executes a franchise command.",
        "tags": [
          "Franchise",
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Franchise\\Policies\\FranchiseCommandPolicy",
          "ability": "execute",
          "privileges": [
            "franchise:execute_event"
          ],
          "notes": "Requires Franchise Execute Event privilege."
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "command": {
                    "type": "string"
                  }
                },
                "required": [
                  "command"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FranchiseCommandResultOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/franchise/documents/headers": {
      "get": {
        "summary": "List franchise document headers",
        "description": "Returns sales document headers for the given date, ordered by document type and number. A date without documents is an empty page.",
        "tags": [
          "Franchise",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Franchise\\Policies\\FranchiseDocumentPolicy",
          "ability": "viewHeaders",
          "privileges": [
            "franchise"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "connection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FranchiseDocumentHeaderOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/franchise/documents/lines": {
      "get": {
        "summary": "List franchise document lines",
        "description": "Returns sales document lines for the given date, ordered by document type, number and line. A date without lines is an empty page.",
        "tags": [
          "Franchise",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Franchise\\Policies\\FranchiseDocumentPolicy",
          "ability": "viewLines",
          "privileges": [
            "franchise"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "connection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FranchiseDocumentLineOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/franchise/documents/payments": {
      "get": {
        "summary": "List franchise document payments",
        "description": "Returns payment totals per payment mode for the given date, ordered by payment mode. A date without payments is an empty page.",
        "tags": [
          "Franchise",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Franchise\\Policies\\FranchiseDocumentPolicy",
          "ability": "viewPayments",
          "privileges": [
            "franchise"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "connection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FranchiseDocumentPaymentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/franchise/documents/payment-methods": {
      "get": {
        "summary": "List franchise document payment methods",
        "description": "Returns payment method entries for the given date, ordered by document type, number and line. A date without entries is an empty page.",
        "tags": [
          "Franchise",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Franchise\\Policies\\FranchiseDocumentPolicy",
          "ability": "viewPaymentMethods",
          "privileges": [
            "franchise:documents:payment_methods"
          ],
          "notes": "Requires specific payment methods privilege."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "connection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FranchiseDocumentPaymentMethodOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/documents/{type}": {
      "get": {
        "summary": "List sale documents by type",
        "description": "Returns the sale documents of one type with optional filters, ordered by number and paginated by cursor: follow meta.next to the last page.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "view",
          "privileges": [
            "vendas:{type}:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Field to sort by, prefixed with - for descending (e.g. -date). Ties are ordered by number in the same direction.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "integrated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "due_date_lt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "customer_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "from_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor taken from meta.next or meta.previous; omit it for the first page. A cursor that was changed, or that was issued for another sort, answers 422 INVALID_CURSOR. There are no page numbers: sending page answers 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "total",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "paid_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "due_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "system_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "relation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[debit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[credit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[integrated][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[integrated][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[due_date_lt][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[due_date_lt][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[customer_name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[from_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[number][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document number (eq) Operators: eq. Example: filter[number][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[total][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by total amount (gte, lte, eq) Operators: gte, lte, eq. Example: filter[total][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[paid_value][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by paid value (gte, lte, eq) Operators: gte, lte, eq. Example: filter[paid_value][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[state][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document state (eq) Operators: eq. Example: filter[state][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[due_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: lte, gte, lt, gt, eq. Example: filter[due_date][lte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[system_date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by system date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[system_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[relation][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by customer relation (eq, ct, sw, ew) Operators: eq, ct, sw, ew. Example: filter[relation][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by last update date (gte, lte, eq) Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate (sw, ew, ct, eq) - requires OFICINAS module Operators: sw, ew, ct, eq. Example: filter[plate][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter parameters",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GetSaleDocumentDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "cursor",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Document type not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create sale document",
        "description": "Creates a new sale document with lines and optional payment information.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "create",
          "privileges": [
            "vendas:{type}:new"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idcustomer": {
                    "type": "integer",
                    "description": "Deprecated (sunset 2027-02-28), use customer_id. Customer internal ID",
                    "deprecated": true
                  },
                  "customer_id": {
                    "type": "integer",
                    "description": "Replaces idcustomer. Required unless customer_tax_id or plate is sent"
                  },
                  "customertaxid": {
                    "type": "string",
                    "description": "Deprecated (sunset 2027-02-28), use customer_tax_id. Customer tax identification number",
                    "deprecated": true
                  },
                  "customer_tax_id": {
                    "type": "string",
                    "description": "Replaces customertaxid"
                  },
                  "serie": {
                    "type": "string",
                    "description": "Document serie code"
                  },
                  "date": {
                    "type": "string",
                    "description": "Document date"
                  },
                  "discount": {
                    "type": "number",
                    "description": "Global discount percentage"
                  },
                  "discount2": {
                    "type": "number",
                    "description": "Secondary global discount percentage"
                  },
                  "paymentmethod": {
                    "type": "string",
                    "description": "Deprecated (sunset 2027-02-28), use payment_method. Payment method code",
                    "deprecated": true
                  },
                  "payment_method": {
                    "type": "string",
                    "description": "Replaces paymentmethod"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Currency code"
                  },
                  "deliverymode": {
                    "type": "string",
                    "description": "Delivery mode code"
                  },
                  "comissiontype": {
                    "type": "string",
                    "description": "Commission type code"
                  },
                  "observations": {
                    "type": "string",
                    "description": "Document observations"
                  },
                  "address_invoice_id": {
                    "type": "string",
                    "description": "Invoice address ID"
                  },
                  "address_ent_id": {
                    "type": "string",
                    "description": "Delivery address ID"
                  },
                  "relation": {
                    "type": "string",
                    "description": "Related entity reference"
                  },
                  "vehicle": {
                    "type": "string",
                    "description": "Vehicle reference"
                  },
                  "num_serie_ext": {
                    "type": "string",
                    "description": "External serie number (required for manual/duplicate/import series)"
                  },
                  "serie_ext": {
                    "type": "string",
                    "description": "External serie code (required for manual/duplicate/import series)"
                  },
                  "type_serie_ext": {
                    "type": "string",
                    "description": "External serie type (required for duplicate series)"
                  },
                  "systemdate": {
                    "type": "string",
                    "description": "System date (required for import series)"
                  },
                  "hash": {
                    "type": "string",
                    "description": "Document hash (required for import series)"
                  },
                  "hashcontrol": {
                    "type": "string",
                    "description": "Hash control (required for import series)"
                  },
                  "documentnumber": {
                    "type": "string",
                    "description": "Deprecated (sunset 2027-02-28), use document_number. Document number (required for import series)",
                    "deprecated": true
                  },
                  "document_number": {
                    "type": "string",
                    "description": "Replaces documentnumber"
                  },
                  "sendemail": {
                    "type": "string",
                    "enum": [
                      "1",
                      "T",
                      "F"
                    ],
                    "description": "Send email flag"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Destination email address"
                  },
                  "plate": {
                    "type": "string",
                    "description": "Vehicle plate (requires OFICINAS module)"
                  },
                  "currentkm": {
                    "type": "number",
                    "description": "Current vehicle kilometers (requires OFICINAS module)"
                  },
                  "campaigncode": {
                    "type": "string",
                    "description": "Campaign code (requires CRM module)"
                  },
                  "businessopportunity": {
                    "type": "number",
                    "description": "Business opportunity ID (requires CRM module)"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "idarticle": {
                          "type": "string",
                          "description": "Deprecated (sunset 2027-02-28), use lines.*.article_id. Article code",
                          "deprecated": true
                        },
                        "article_id": {
                          "type": "string",
                          "description": "Replaces lines.*.idarticle"
                        },
                        "quantity": {
                          "type": "number",
                          "description": "Line quantity"
                        },
                        "sellingprice": {
                          "type": "number",
                          "description": "Deprecated (sunset 2027-02-28), use lines.*.selling_price. Selling price without VAT",
                          "deprecated": true
                        },
                        "selling_price": {
                          "type": "number",
                          "description": "Replaces lines.*.sellingprice. This or selling_price_with_vat is required, except for the \".\" article"
                        },
                        "sellingpricewithvat": {
                          "type": "number",
                          "description": "Deprecated (sunset 2027-02-28), use lines.*.selling_price_with_vat. Selling price with VAT",
                          "deprecated": true
                        },
                        "selling_price_with_vat": {
                          "type": "number",
                          "description": "Replaces lines.*.sellingpricewithvat. This or selling_price is required, except for the \".\" article"
                        },
                        "vatid": {
                          "type": "string",
                          "description": "Deprecated (sunset 2027-02-28), use lines.*.vat_id. VAT code override",
                          "deprecated": true
                        },
                        "vat_id": {
                          "type": "string",
                          "description": "Replaces lines.*.vatid"
                        },
                        "re": {
                          "type": "string",
                          "description": "VAT exemption code"
                        },
                        "discount": {
                          "type": "number",
                          "description": "Line discount percentage"
                        },
                        "discount2": {
                          "type": "number",
                          "description": "Line secondary discount percentage"
                        },
                        "number_ori": {
                          "type": "number",
                          "description": "Origin document number"
                        },
                        "type_ori": {
                          "type": "string",
                          "description": "Origin document type"
                        },
                        "line_ori": {
                          "type": "number",
                          "description": "Origin document line number"
                        }
                      },
                      "required": [
                        "article_id",
                        "quantity"
                      ]
                    },
                    "description": "Document lines"
                  },
                  "paymenttype": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "description": "Payment amount"
                        },
                        "date": {
                          "type": "string",
                          "description": "Payment date"
                        },
                        "bank": {
                          "type": "string",
                          "description": "Bank code"
                        },
                        "accountbank": {
                          "type": "string",
                          "description": "Bank account code"
                        },
                        "number": {
                          "type": "string",
                          "description": "Payment reference number"
                        },
                        "cashregister": {
                          "type": "string",
                          "description": "Cash register code"
                        },
                        "id_valeoferta": {
                          "type": "number",
                          "description": "Gift voucher ID"
                        }
                      }
                    },
                    "description": "Payment type breakdown"
                  },
                  "lines.*.idarticle": {
                    "type": "string",
                    "description": "Deprecated (sunset 2027-02-28), use lines.*.article_id. Article code",
                    "deprecated": true
                  },
                  "lines.*.article_id": {
                    "type": "string",
                    "description": "Replaces lines.*.idarticle"
                  },
                  "lines.*.quantity": {
                    "type": "number",
                    "description": "Line quantity"
                  },
                  "lines.*.sellingprice": {
                    "type": "number",
                    "description": "Deprecated (sunset 2027-02-28), use lines.*.selling_price. Selling price without VAT",
                    "deprecated": true
                  },
                  "lines.*.selling_price": {
                    "type": "number",
                    "description": "Replaces lines.*.sellingprice. This or selling_price_with_vat is required, except for the \".\" article"
                  },
                  "lines.*.sellingpricewithvat": {
                    "type": "number",
                    "description": "Deprecated (sunset 2027-02-28), use lines.*.selling_price_with_vat. Selling price with VAT",
                    "deprecated": true
                  },
                  "lines.*.selling_price_with_vat": {
                    "type": "number",
                    "description": "Replaces lines.*.sellingpricewithvat. This or selling_price is required, except for the \".\" article"
                  },
                  "lines.*.vatid": {
                    "type": "string",
                    "description": "Deprecated (sunset 2027-02-28), use lines.*.vat_id. VAT code override",
                    "deprecated": true
                  },
                  "lines.*.vat_id": {
                    "type": "string",
                    "description": "Replaces lines.*.vatid"
                  },
                  "lines.*.re": {
                    "type": "string",
                    "description": "VAT exemption code"
                  },
                  "lines.*.discount": {
                    "type": "number",
                    "description": "Line discount percentage"
                  },
                  "lines.*.discount2": {
                    "type": "number",
                    "description": "Line secondary discount percentage"
                  },
                  "lines.*.number_ori": {
                    "type": "number",
                    "description": "Origin document number"
                  },
                  "lines.*.type_ori": {
                    "type": "string",
                    "description": "Origin document type"
                  },
                  "lines.*.line_ori": {
                    "type": "number",
                    "description": "Origin document line number"
                  },
                  "paymenttype.*.value": {
                    "type": "number",
                    "description": "Payment amount"
                  },
                  "paymenttype.*.date": {
                    "type": "string",
                    "description": "Payment date"
                  },
                  "paymenttype.*.bank": {
                    "type": "string",
                    "description": "Bank code"
                  },
                  "paymenttype.*.accountbank": {
                    "type": "string",
                    "description": "Bank account code"
                  },
                  "paymenttype.*.number": {
                    "type": "string",
                    "description": "Payment reference number"
                  },
                  "paymenttype.*.cashregister": {
                    "type": "string",
                    "description": "Cash register code"
                  },
                  "paymenttype.*.id_valeoferta": {
                    "type": "number",
                    "description": "Gift voucher ID"
                  }
                },
                "required": [
                  "lines",
                  "lines.*.article_id",
                  "lines.*.quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateSaleDocumentDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/document-validations/{number}/lines": {
      "get": {
        "summary": "List validation lines for a document",
        "description": "Returns the lines of a specific document and the validation progress (missing, excess, validated). Exactly one document type must be provided via query.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\DocumentValidation\\Policies\\DocumentValidationPolicy",
          "ability": "viewAny",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "description": "Exactly one document type (alias or real tipoop)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number (default 1)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 100, max 500)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter map, e.g. filter[id]=...",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentValidationLinesListOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upsert a line validation entry",
        "description": "Creates or updates the qty/qty_diff for a line in doc_validacao. The qty field accepts +N/-N to apply a delta to the current qty.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\DocumentValidation\\Policies\\DocumentValidationPolicy",
          "ability": "save",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Document type (alias like INVOICE or real tipoop)"
                  },
                  "id": {
                    "type": "string",
                    "description": "Article code"
                  },
                  "qty": {
                    "type": "string",
                    "description": "Read quantity; accepts +N/-N delta prefix"
                  },
                  "lot": {
                    "type": "string",
                    "description": "Lot code (default \".\")"
                  },
                  "line": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Specific line number in the document"
                  },
                  "without_lines": {
                    "type": "string",
                    "description": "When truthy, response omits the refreshed lines payload"
                  }
                },
                "required": [
                  "type",
                  "id",
                  "qty"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentValidationLinesListOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Remove a line validation entry",
        "description": "Deletes the validation row for a line. When qty_fact > 0, resets qty to qty_fact and qty_diff to 0 instead of deleting.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\DocumentValidation\\Policies\\DocumentValidationPolicy",
          "ability": "delete",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Document type (alias or real tipoop)"
                  },
                  "id": {
                    "type": "string",
                    "description": "Article code (required when line is absent)"
                  },
                  "line": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Line number in the document (required when id is absent)"
                  },
                  "lot": {
                    "type": "string",
                    "description": "Lot code (default \".\")"
                  },
                  "without_lines": {
                    "type": "string",
                    "description": "When truthy, response omits the refreshed lines payload"
                  }
                },
                "required": [
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentValidationLinesListOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/documents": {
      "get": {
        "summary": "List available document types",
        "description": "Returns all available sale document types that can be used in document operations.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "viewAny",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "paymentdocument",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: like. Example: filter[description][like]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[paymentdocument][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[paymentdocument][eq]=value",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of available sale document types.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/documents/{type}/{id}": {
      "get": {
        "summary": "Get sale document by ID",
        "description": "Returns a single sale document by its ID with optional print/email options.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "view",
          "privileges": [
            "vendas:{type}:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "print",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "A",
                "T",
                "O"
              ]
            }
          },
          {
            "name": "sendemail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "T",
                "F"
              ]
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            }
          },
          {
            "name": "layout_venda",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "print_with_values",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "getoriginalorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "T",
                "F"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GetSaleDocumentDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update sale document",
        "description": "Updates an existing sale document with optional integration flags.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "update",
          "privileges": [
            "vendas:{type}:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integrated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "integrated"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Document updated successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Document not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation or business rule error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/documents/{type}/{id}/status": {
      "get": {
        "summary": "Get document status",
        "description": "Returns the current status information of a sale document.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "editStatus",
          "privileges": [
            "vendas:{type}:editar_estado"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document status retrieved successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Document not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update document status",
        "description": "Updates the status of a sale document with optional observations.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "editStatus",
          "privileges": [
            "vendas:{type}:editar_estado"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "observations": {
                    "type": "string"
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Document status updated successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Document not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/document-validations": {
      "get": {
        "summary": "List documents pending validation",
        "description": "Returns the list of sale/purchase documents that can be validated, together with each document aggregated missing/excess/validated counters. Filters and search keys follow the legacy /sales/search/documents/validate contract.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\DocumentValidation\\Policies\\DocumentValidationPolicy",
          "ability": "viewAny",
          "privileges": [
            "vendas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "types",
            "in": "query",
            "required": false,
            "description": "Comma-separated document types (e.g. INVOICE,ORDER)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number (default 1)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (default 500, max 1000)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "only_missing",
            "in": "query",
            "required": false,
            "description": "When falsy, include documents with no pending validation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purchase",
            "in": "query",
            "required": false,
            "description": "When truthy, restrict to purchase documents",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter map, e.g. filter[documentnumber]=...",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Search map with txt and bc (base64-encoded)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentValidationOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/documents/{type}/{id}/delete": {
      "patch": {
        "summary": "Delete sale document",
        "description": "Soft deletes a sale document with optional reason for audit trail.",
        "tags": [
          "Sales",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Documents\\Policies\\DocumentPolicy",
          "ability": "delete",
          "privileges": [
            "vendas:{type}:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason_id": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Document deleted successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Document not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/send-sms": {
      "post": {
        "summary": "Send SMS",
        "description": "Sends SMS to a mobile number and returns provider response fields.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mobile_phone": {
                    "type": "string",
                    "description": "Destination mobile phone number.",
                    "example": "912345678"
                  },
                  "sms_text": {
                    "type": "string",
                    "description": "SMS message content.",
                    "example": "Mensagem de teste"
                  }
                },
                "required": [
                  "mobile_phone",
                  "sms_text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SMS sending payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SendSmsDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/send-email": {
      "post": {
        "summary": "Send email",
        "description": "Sends email using configured mail transport and returns raw sender response.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "Sender email or object with email key.",
                    "example": "sender@officegest.pt"
                  },
                  "to": {
                    "type": "string",
                    "description": "Recipient email or list of recipients.",
                    "example": "destinatario@officegest.pt"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Email subject.",
                    "example": "Assunto"
                  },
                  "content": {
                    "type": "string",
                    "description": "Email body content.",
                    "example": "Conteudo do email"
                  }
                },
                "required": [
                  "to",
                  "subject",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mail sending provider response payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SendEmailDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/company": {
      "get": {
        "summary": "Get Company information",
        "description": "Returns Company Information",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Company information payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CompanyInfoDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/company/logo": {
      "get": {
        "summary": "Get company logo",
        "description": "Returns company logo file content in base64.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Returns image mime type and base64 content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CompanyImageDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/company/logo-pos": {
      "get": {
        "summary": "Get POS logo",
        "description": "Returns POS logo in base64 when POSMOBILE module is enabled.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Returns image mime type and base64 content when POSMOBILE is enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CompanyImageDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/company/qrcode-pos": {
      "get": {
        "summary": "Get POS QR code",
        "description": "Returns POS QR code in base64 when POSMOBILE module is enabled.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Returns image mime type and base64 content when POSMOBILE is enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CompanyImageDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/company/pos": {
      "get": {
        "summary": "Get POS configuration",
        "description": "Returns POS configuration fields from company settings.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Company POS settings payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CompanyPosDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/license": {
      "get": {
        "summary": "Get license metadata",
        "description": "Returns license payload excluding private/internal fields.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Sanitized license payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicenseDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/parameters": {
      "get": {
        "summary": "Get whitelisted parameters",
        "description": "Returns allowed runtime parameters used by mobile/integrations.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "param",
            "in": "query",
            "required": false,
            "description": "Legacy compatibility parameter. When provided, endpoint returns empty payload.",
            "example": "legacy",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Whitelisted parameters payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ParametersDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/decision-variables": {
      "get": {
        "summary": "Get decision variables by phone",
        "description": "Returns decision variables for a given phone number.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "phone",
            "in": "query",
            "required": true,
            "description": "Phone number used to resolve decision variables.",
            "example": "912345678",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Decision variables payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DecisionVariableDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/utils/decision-variables-bulk": {
      "get": {
        "summary": "Get all decision variables",
        "description": "Returns all decision variables and translated label map.",
        "tags": [
          "Utils"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Utils\\Policies\\UtilsPolicy"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Decision variables list and translated names map",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DecisionVariablesBulkDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/checklists": {
      "get": {
        "summary": "List service order checklists",
        "description": "Returns checklists assigned to the service order with item completion status.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderChecklistDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Attach checklists to a service order",
        "description": "Attaches one or more checklist templates to a service order, copying the active items of each newly attached checklist. Already-attached checklists are skipped (idempotent) and keep their existing item state. Returns the updated list of checklists for the service order.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "checklist_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "Valid value from ofic_checklist.id,{active:1}."
                    },
                    "description": "Checklist template IDs to attach to the service order. Each must reference an active checklist. Attaching an already-attached checklist is a no-op."
                  }
                },
                "required": [
                  "checklist_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderChecklistDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/extra-lines": {
      "get": {
        "summary": "List service order extra lines",
        "description": "Returns a paginated list of extra lines for a given service order.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderExtraLinePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter by article code (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by description (eq, ct)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description_extra",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "quantity",
            "in": "query",
            "required": false,
            "description": "Filter by quantity (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "unit_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "vat_percentage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "discount_percentage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "total_without_vat",
            "in": "query",
            "required": false,
            "description": "Filter by total without VAT (eq, gte, lte)",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "mechanic_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "article_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by line status (eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "line_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[article_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description_extra][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[description_extra][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[quantity][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[quantity][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[unit_price][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[unit_price][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[vat_percentage][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[vat_percentage][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount_percentage][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[discount_percentage][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[total_without_vat][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[total_without_vat][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[mechanic_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[mechanic_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[article_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[article_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[status][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[status][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[line_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[line_number][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix - for DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderExtraLineOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add extra line to service order",
        "description": "Inserts one or more extra lines (articles/services) into a service order. Complementary articles are added automatically when\n        applicable.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderExtraLinePolicy",
          "ability": "create",
          "privileges": [
            "oficinas:ordservico:adicionar_linhas_extra"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "article_id": {
                    "type": "string",
                    "description": "Article code"
                  },
                  "quantity": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Quantity (must be > 0)"
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "description": "Store/warehouse code"
                  },
                  "unit_price": {
                    "type": "number",
                    "description": "Unit price (calculated from price tables if omitted)"
                  },
                  "vat_percentage": {
                    "type": "number",
                    "description": "VAT percentage"
                  },
                  "vat_exemption_reason_id": {
                    "type": "integer",
                    "description": "VAT exemption reason code"
                  },
                  "discount_percentage": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Discount 1 (0-100)"
                  },
                  "discount_percentage_2": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Discount 2 (0-100)"
                  },
                  "discount_percentage_3": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Discount 3 (0-100)"
                  },
                  "discount_percentage_4": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Discount 4 (0-100)"
                  },
                  "discount_percentage_5": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Discount 5 (0-100)"
                  },
                  "mechanic_id": {
                    "type": "integer",
                    "description": "Mechanic employee code"
                  },
                  "mechanic_hours": {
                    "type": "number",
                    "description": "Operation hours"
                  },
                  "operation_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Operation date (Y-m-d)"
                  },
                  "department_id": {
                    "type": "integer",
                    "description": "Department ID"
                  },
                  "description_extra": {
                    "type": "string",
                    "description": "Extended description"
                  },
                  "intervention_id": {
                    "type": "integer",
                    "description": "Intervention type ID"
                  },
                  "find_price": {
                    "type": "boolean",
                    "enum": [
                      true,
                      false
                    ],
                    "description": "Whether to calculate price from price tables (default: true)"
                  },
                  "observations": {
                    "type": "string",
                    "description": "Observations"
                  }
                },
                "required": [
                  "article_id",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderExtraLineOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/objectives-by-employee": {
      "get": {
        "summary": "Labour objectives by employee",
        "description": "Returns, per employee and per month, the service order hours and mechanic task hours worked against the monthly labour-hours objective. Only employee/month pairs with a positive objective and clocked service order hours are returned. When no date range is supplied the current month is used. A range that covers only part of a month compares partial hours against the full monthly objective.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Relatorios\\Oficinas\\Objectives\\Policies\\WorkshopReportsPolicy",
          "ability": "viewObjectivesByEmployee",
          "privileges": [
            "relatorios:oficinas",
            "relatorios:oficinas:objectivos"
          ],
          "notes": "Requires both Workshop Reports and Objectives report privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sortable field: employee_id, employee_name, year, month, osv_hours, task_hours, total_hours, objective_hours, difference_hours, achievement_percent.",
            "example": "total_hours",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction: ASC or DESC. Default order is employee_id, year, month ascending.",
            "example": "DESC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "clock_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[clock_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[clock_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Deep object filter, one entry per operator. filter[clock_at][gte] and filter[clock_at][lte] bound the period (Y-m-d); the same bounds apply to the service order clock-in datetime and to the mechanic task hours. When no bound is supplied the current month is used. filter[employees][] restricts the employees. The root form clock_at=Y-m-d selects a single day.",
            "example": {
              "clock_at": {
                "gte": "2026-01-01",
                "lte": "2026-03-31"
              },
              "employees": [
                3
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ObjectiveByEmployeeOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/service-order-times": {
      "get": {
        "summary": "Service order times report",
        "description": "Returns, per calendar month, the hours clocked on service orders (time_spent) and the invoiced labour hours prorated over those same mechanic tasks (time_invoiced). When no window is supplied the current month and the three previous ones are returned. start_date/end_date are expanded to the whole calendar months they belong to, and every month in the window is returned, including months with no clocked hours (zeros) — the response is never empty.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\Policies\\ServiceOrderReportsPolicy",
          "ability": "viewServiceOrderTimes",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/includes/graph_osv_times (dashboard.id=81), which gates on the bare Workshop module privilege. Deliberately looser than WorkshopReportsPolicy, whose abilities gate on relatorios:oficinas privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day of the window (inclusive). Defaults to the first day of the month 4 months back (current month included). The report buckets whole calendar months, so a mid-month date is expanded to the whole month it belongs to.",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day of the window (inclusive). Defaults to today. Expanded to the whole calendar month it belongs to.",
            "example": "2026-04-30",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderTimeOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/brands-served-current-month": {
      "get": {
        "summary": "Brands served in the current month",
        "description": "Returns how many service orders the current calendar month has per vehicle brand, plus the window that was queried. Takes no parameters: the window is the server month, there is no filter and no pagination. Cancelled, draft, invoiced and appointment service orders are excluded; delivered ones are counted. Counting is per service order, so the same vehicle in two service orders counts twice. Brands are keyed by name, so brands sharing a name are one row and brands differing only in case are separate rows. Rows come in first-seen order and always carry a count of 1 or more; brands is empty when no service order survives in the month.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\Policies\\ServiceOrderReportsPolicy",
          "ability": "viewBrandsServedCurrentMonth",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget relatorios/estadisticas/graph_osv_brands_current_month (dashboard.id=78), which gates on the bare Workshop module privilege, like viewServiceOrderTimes."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "The queried month and one row per brand served in it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "month": {
                          "type": "string",
                          "description": "The window actually queried, Y-m, from the server clock."
                        },
                        "brands": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "brand": {
                                "type": "string",
                                "nullable": true,
                                "description": "Raw brand name (EquipMarcas.designacao), never translated. Null is the no-brand bucket: service orders whose vehicle is missing, has no brand, or whose brand name is empty. At most one row carries it."
                              },
                              "count": {
                                "type": "integer",
                                "description": "Service orders counted for the brand in the window. Always 1 or more -- a bucket only exists when it counted something."
                              }
                            },
                            "required": [
                              "brand",
                              "count"
                            ]
                          },
                          "description": "One row per brand served in the window, in first-seen order. Empty when the month has no surviving service order."
                        }
                      },
                      "required": [
                        "month",
                        "brands"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/vehicles-in-park-by-status": {
      "get": {
        "summary": "Vehicles in park by status",
        "description": "Returns a snapshot of the service orders currently in the park, split into exactly three buckets: waiting, in_execution and awaiting_parts. Takes no parameters — there is no window, no filter and no pagination. The awaiting_parts flag wins over the status, so a waiting or in-execution service order flagged as awaiting parts is only counted in awaiting_parts. Service orders whose status survives the park filter but is neither ESP nor EXE (closed ones, and any custom status) are counted in no bucket, so the three counts do not necessarily add up to the park total. All three rows are always present, in this order, with counts of zero when the park is empty.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\Policies\\ServiceOrderReportsPolicy",
          "ability": "viewVehiclesInParkByStatus",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget relatorios/estadisticas/graph_osv_vehicles_status (dashboard.id=77), which gates on the bare Workshop module privilege. Deliberately looser than WorkshopReportsPolicy, whose abilities gate on relatorios:oficinas privileges."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehiclesInParkStatusOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/vehicles-in-park-by-day": {
      "get": {
        "summary": "Vehicles in park on the day",
        "description": "Returns how many service orders are in park as of the end of the current server day, plus the cut-off date that was queried. Draft, cancelled, invoiced, delivered and appointment service orders are excluded; every other status counts, and there is no lower date bound, so this is the whole park minus the orders dated in the future rather than the orders opened today. Counting is per service order with no DISTINCT on the vehicle, so two orders for the same vehicle count twice. The count is zero when the park is empty, never a 404. Every parameter is optional and additive: with none of them the payload is just the date and the count. warehouse_id restricts every number to one warehouse and is echoed back; compare_days adds a comparison block for an earlier day; history_days adds a daily series ending on the response date. The series is non-decreasing by construction -- see the history field description before plotting it as a park-over-time chart.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\Policies\\ServiceOrderReportsPolicy",
          "ability": "viewVehiclesInParkByDay",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget relatorios/estadisticas/oficinas_viaturas_em_parque_no_dia (dashboard.id=79), which gates on the bare Workshop module privilege. Distinct from viewVehiclesInParkByStatus: same population, but bounded to the current day."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Restrict every number in the response to one warehouse (lojas.CodLoja). Omit for the whole park, which is what the legacy widget counts. An id that is not a real warehouse is a 422, never a silent zero.",
            "example": "4",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "history_days",
            "in": "query",
            "required": false,
            "description": "Number of daily points to return in `history`, ending on the response `date`. One of 0, 7, 30 or 90; 0 (the default) omits `history` entirely.",
            "example": "7",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                7,
                30,
                90
              ]
            }
          },
          {
            "name": "compare_days",
            "in": "query",
            "required": false,
            "description": "Return a `comparison` block for the day this many days before the response `date` -- 1 is yesterday. Omit to leave `comparison` out of the payload.",
            "example": "1",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The queried cut-off date and the number of service orders in park on it, plus the optional warehouse echo, comparison and daily series when they were requested.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "description": "The cut-off date actually queried, Y-m-d, from the server clock. It is the snapshot date the legacy widget labels \"Hoje\", and the consumer should title the card with it instead of deriving it from the browser clock."
                        },
                        "count": {
                          "type": "integer",
                          "description": "Service orders in park whose date is not in the future. Zero or more -- an empty park is a valid answer, never a 404. Counted per SERVICE ORDER with no DISTINCT on the vehicle, so two orders for the same vehicle count twice: do not present it as distinct vehicles."
                        },
                        "warehouse_id": {
                          "type": "integer",
                          "description": "Echo of the warehouse the caller filtered by (lojas.CodLoja). ABSENT when no warehouse was requested, so a cached payload always names the window it holds."
                        },
                        "comparison": {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "description": "The cut-off date of this point, Y-m-d."
                            },
                            "count": {
                              "type": "integer",
                              "description": "Service orders in park as of the end of that date."
                            }
                          },
                          "required": [
                            "date",
                            "count"
                          ],
                          "description": "The same count taken compare_days earlier. ABSENT (not null) when compare_days was not sent."
                        },
                        "history": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": {
                                "type": "string",
                                "description": "The cut-off date of this point, Y-m-d."
                              },
                              "count": {
                                "type": "integer",
                                "description": "Service orders in park as of the end of that date."
                              }
                            },
                            "required": [
                              "date",
                              "count"
                            ]
                          },
                          "description": "One point per day, ascending, ending on the response date, with exactly history_days entries and no gaps. ABSENT when history_days is 0 or absent. The series is NON-DECREASING: the status filter is evaluated at query time and the only date-dependent term is the upper bound, so a day with no new order repeats the previous value instead of dropping to zero, and the count never falls. Read it as \"the orders in park today, distributed by opening date\", NOT as the park as it stood on each day -- an order opened last month and invoiced today is absent from every point."
                        }
                      },
                      "required": [
                        "date",
                        "count"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/invoiced-service-orders": {
      "get": {
        "summary": "Invoiced service orders report",
        "description": "Returns how many service orders (status FAC, joined to their invoicing document by number and type) were invoiced today, plus the optional invoiced totals, warehouse echo, single-day comparison and daily series when they were requested. The series is a daily flow, so a day with nothing invoiced is a real zero, and the comparison is one exact day, never an accumulated range. total and total_without_vat are summed independently; do not subtract one from the other to obtain VAT.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\Policies\\ServiceOrderReportsPolicy",
          "ability": "viewInvoicedServiceOrders",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget relatorios/estadisticas/oficinas_osv_faturadas (dashboard.id=80), which gates on the bare Workshop module privilege, like the other four report widgets."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Restrict every number in the response to one warehouse (lojas.CodLoja). Omit for every warehouse, which is what the legacy widget counts. An id that is not a real warehouse is a 422, never a silent zero.",
            "example": "4",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "history_days",
            "in": "query",
            "required": false,
            "description": "Number of daily points to return in `history`, ending on the response `date`. One of 0, 7, 30 or 90; 0 (the default) omits `history` entirely. The series is a daily flow, so a day with nothing invoiced is a real zero, never a gap.",
            "example": "7",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                7,
                30,
                90
              ]
            }
          },
          {
            "name": "compare_days",
            "in": "query",
            "required": false,
            "description": "Return a `comparison` block for the day this many days before the response `date` -- 1 is yesterday, 7 a week, 28 four weeks. 0 or omitted leaves `comparison` out of the payload. The comparison is that single day, never an accumulated range.",
            "example": "1",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_totals",
            "in": "query",
            "required": false,
            "description": "Set to 1 to add `total` (invoiced total, VAT included) and `total_without_vat` (the same total excluding VAT) to the response, to `comparison` and to every `history` point. Both are omitted by default. Do not derive VAT by subtracting one from the other: `Total` is stored rounded and `TotalSIVA` is not, so the difference drifts over a large enough set.",
            "example": "1",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InvoicedServiceOrdersOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/service-order-statuses": {
      "get": {
        "summary": "Service order statuses",
        "description": "Returns the service orders behind the /oficinas/estadososv board and the dashboard.id=73 widget: one entry per order with its status, dates, vehicle, interventions, the mechanics clocked in on it right now and the sales documents linked to it. Every filter is optional. Without a status filter the query base applies its own default of ESP, EXE and MAR; sending status replaces that default, so any status the tenant defines can be asked for. Sending warehouses, departments or series replaces that default as well, and the answer then spans every status, so send status explicitly whenever the set matters. The response is not paginated, matching the board, which loads the whole set in one request. An empty workshop returns an empty data array, never a 404.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Reports\\Policies\\ServiceOrderReportsPolicy",
          "ability": "viewServiceOrderStatuses",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/estadososv_home (dashboard.id=73), which gates on the bare Workshop module privilege. The same data also backs the /oficinas/estadososv screen, reached from the Workshop menu under the same privilege."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "date_reception_start",
            "in": "query",
            "required": false,
            "description": "Lower bound for the reception date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_reception_end",
            "in": "query",
            "required": false,
            "description": "Upper bound for the reception date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "has_delivery_date",
            "in": "query",
            "required": false,
            "description": "true keeps only orders with an expected delivery date, false only those without one",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "date_delivery_start",
            "in": "query",
            "required": false,
            "description": "Lower bound for the expected delivery date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_delivery_end",
            "in": "query",
            "required": false,
            "description": "Upper bound for the expected delivery date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Service order status codes. Without it the query base applies its own default of ESP, EXE and MAR, unless warehouses, departments or series is sent: those replace the whole status default and the answer then spans every status. Send status explicitly whenever the set matters",
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "warehouses",
            "in": "query",
            "required": false,
            "description": "Warehouse ids",
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "departments",
            "in": "query",
            "required": false,
            "description": "Department ids",
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "series",
            "in": "query",
            "required": false,
            "description": "Billing series numbers",
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "budget_status",
            "in": "query",
            "required": false,
            "description": "Keeps only orders holding a linked document in one of these statuses. Orders with no linked document are dropped as well",
            "schema": {
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderStatusOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/vehicles-in-park": {
      "get": {
        "summary": "Vehicles in park",
        "description": "Returns the open service orders of the workshop park: status ESP or EXE and not cancelled, newest first. Scoped to the billing series the authenticated user has access to, exactly like the legacy widget: a user with no series access configured sees every series, which is the legacy behaviour and not an authorization decision taken here. Takes no parameters and is not paginated.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Overview\\Policies\\WorkshopOverviewPolicy",
          "ability": "viewVehiclesInPark",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/oficinas_home (dashboard.id=3), which gates on the bare Workshop module privilege. Deliberately looser than AlertPolicy, whose ability gates on oficinas:alertas: a user who sees the legacy widget today must keep seeing the same rows through the API."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleInParkOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/maintenance-plan-alerts": {
      "get": {
        "summary": "Maintenance plan alerts",
        "description": "Returns the maintenance plans that are still pending and already due: either the plan counter is within km_tolerance of the current vehicle reading, or the plan limit date falls inside the window, or the plan has no limit date at all. Plans without a limit date are listed last.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Overview\\Policies\\WorkshopOverviewPolicy",
          "ability": "viewMaintenancePlanAlerts",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/oficinas_home (dashboard.id=3), which gates on the bare Workshop module privilege. Deliberately looser than AlertPolicy, whose ability gates on oficinas:alertas: a user who sees the legacy widget today must keep seeing the same rows through the API."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Size of the look-ahead window, in days from now. Defaults to 30, the value the legacy dashboard widget uses.",
            "example": 30,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "km_tolerance",
            "in": "query",
            "required": false,
            "description": "Counter margin added to the current vehicle reading when deciding whether a plan is due. Defaults to 10000, the value the legacy dashboard widget uses.",
            "example": 10000,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MaintenancePlanAlertOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/inspection-alerts": {
      "get": {
        "summary": "Inspection alerts",
        "description": "Returns the vehicles whose next inspection falls between now and the end of the window. This is the only alert list with a lower bound: inspections already overdue are NOT returned. Vehicles without an owner are excluded, mirroring the inner join of the legacy query.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Overview\\Policies\\WorkshopOverviewPolicy",
          "ability": "viewInspectionAlerts",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/oficinas_home (dashboard.id=3), which gates on the bare Workshop module privilege. Deliberately looser than AlertPolicy, whose ability gates on oficinas:alertas: a user who sees the legacy widget today must keep seeing the same rows through the API."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Size of the look-ahead window, in days from now. Defaults to 30, the value the legacy dashboard widget uses.",
            "example": 30,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InspectionAlertOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/insurance-alerts": {
      "get": {
        "summary": "Insurance alerts",
        "description": "Returns the vehicles whose insurance expires up to the end of the window. There is no lower bound: policies that expired long ago are returned too, as in the legacy widget.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Overview\\Policies\\WorkshopOverviewPolicy",
          "ability": "viewInsuranceAlerts",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/oficinas_home (dashboard.id=3), which gates on the bare Workshop module privilege. Deliberately looser than AlertPolicy, whose ability gates on oficinas:alertas: a user who sees the legacy widget today must keep seeing the same rows through the API."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Size of the look-ahead window, in days from now. Defaults to 30, the value the legacy dashboard widget uses.",
            "example": 30,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InsuranceAlertOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/road-tax-alerts": {
      "get": {
        "summary": "Road tax alerts",
        "description": "Returns the vehicles whose road tax (IUC) expires up to the end of the window, with the last amount paid. There is no lower bound: already expired ones are returned too.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Overview\\Policies\\WorkshopOverviewPolicy",
          "ability": "viewRoadTaxAlerts",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/oficinas_home (dashboard.id=3), which gates on the bare Workshop module privilege. Deliberately looser than AlertPolicy, whose ability gates on oficinas:alertas: a user who sees the legacy widget today must keep seeing the same rows through the API."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Size of the look-ahead window, in days from now. Defaults to 30, the value the legacy dashboard widget uses.",
            "example": 30,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RoadTaxAlertOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/reports/driver-licence-alerts": {
      "get": {
        "summary": "Driver licence alerts",
        "description": "Returns the drivers whose ADR licence expires up to the end of the window. There is no lower bound: already expired licences are returned too.",
        "tags": [
          "Workshop",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Overview\\Policies\\WorkshopOverviewPolicy",
          "ability": "viewDriverLicenceAlerts",
          "privileges": [
            "oficinas"
          ],
          "notes": "Mirrors dashboard.privilege of the legacy widget oficinas/oficinas_home (dashboard.id=3), which gates on the bare Workshop module privilege. Deliberately looser than AlertPolicy, whose ability gates on oficinas:alertas: a user who sees the legacy widget today must keep seeing the same rows through the API."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Size of the look-ahead window, in days from now. Defaults to 30, the value the legacy dashboard widget uses.",
            "example": 30,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DriverLicenceAlertOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/checklists/{checklist}/items/{item}": {
      "patch": {
        "summary": "Update service order checklist item",
        "description": "Sets the observations and/or the checked state of a checklist item on a service order. Creates the item row if it does not exist yet.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checklist",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "observations": {
                    "type": "string",
                    "description": "Checklist item observations; HTML allowed. At least one of observations/check is required."
                  },
                  "check": {
                    "type": "boolean",
                    "description": "Whether the checklist item is completed. At least one of observations/check is required."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/extra-lines/{lineNumber}": {
      "delete": {
        "summary": "Delete extra line from service order",
        "description": "Removes an extra line (article/service) from a service order. Complementary and bundle child lines are removed automatically\n        when applicable.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderExtraLinePolicy",
          "ability": "delete",
          "privileges": [
            "oficinas:ordservico:adicionar_linhas_extra"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lineNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/times": {
      "get": {
        "summary": "List service order times",
        "description": "Returns mechanic hour records for a service order.",
        "tags": [
          "Workshop",
          "Service Order Times"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Hour records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderHourOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add time to service order",
        "description": "Creates a new mechanic hour record for a service order.",
        "tags": [
          "Workshop",
          "Service Order Times"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employee_id": {
                    "type": "integer",
                    "description": "Employee ID (mechanic)."
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Start date (Y-m-d)."
                  },
                  "start_time": {
                    "type": "string",
                    "description": "Start time (H:i)."
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date",
                    "description": "End date (Y-m-d)."
                  },
                  "end_time": {
                    "type": "string",
                    "description": "End time (H:i)."
                  },
                  "intervention_id": {
                    "type": "integer",
                    "description": "Intervention ID (depends on OFIC_ArtigoServicoComoTarefa param)."
                  },
                  "task_column": {
                    "type": "string",
                    "enum": [
                      "intervention_id",
                      "article_id",
                      "article_extra_id"
                    ],
                    "description": "Column for task mapping: intervention_id, article_id, or article_extra_id."
                  },
                  "end_intervention": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ],
                    "description": "1 to mark intervention as ended, 0 otherwise."
                  }
                },
                "required": [
                  "employee_id",
                  "start_date",
                  "start_time",
                  "end_date",
                  "end_time"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Hour record created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderHourOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/times/{timeId}": {
      "patch": {
        "summary": "Update service order time",
        "description": "Updates an existing mechanic hour record for a service order.",
        "tags": [
          "Workshop",
          "Service Order Times"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "employee_id": {
                    "type": "integer",
                    "description": "Employee ID (mechanic). Keeps existing if omitted."
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Start date (Y-m-d). Keeps existing if omitted."
                  },
                  "start_time": {
                    "type": "string",
                    "description": "Start time (H:i). Keeps existing if omitted."
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date",
                    "description": "End date (Y-m-d). Keeps existing if omitted."
                  },
                  "end_time": {
                    "type": "string",
                    "description": "End time (H:i). Keeps existing if omitted."
                  },
                  "intervention_id": {
                    "type": "integer",
                    "description": "Intervention ID (depends on OFIC_ArtigoServicoComoTarefa param)."
                  },
                  "task_column": {
                    "type": "string",
                    "enum": [
                      "intervention_id",
                      "article_id",
                      "article_extra_id"
                    ],
                    "description": "Column for task mapping: intervention_id, article_id, or article_extra_id."
                  },
                  "end_intervention": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ],
                    "description": "1 to mark intervention as ended, 0 otherwise."
                  },
                  "billable_hours": {
                    "type": "number",
                    "description": "Billable hours override."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Hour record updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderHourOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/budget/{budget}/approve": {
      "put": {
        "summary": "Approve budget",
        "description": "Approves a budget based on its ID if it meets the necessary conditions.",
        "tags": [
          "Sales",
          "Budget"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Budget\\Policies\\BudgetPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "budget",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Budget approved successfully.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "400": {
            "description": "Budget could not be approved. Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Budget cannot be approved from its current state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders": {
      "get": {
        "summary": "List service orders",
        "description": "Returns paginated service orders with modern query parameters.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "Filter by service order number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "customer_name",
            "in": "query",
            "required": false,
            "description": "Partial search on customer name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "delivery_name",
            "in": "query",
            "required": false,
            "description": "Partial search on delivery name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by service order status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status_in",
            "in": "query",
            "required": false,
            "description": "Filter by multiple statuses (comma-separated, e.g. ABR,ESP,MAR).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status_not_in",
            "in": "query",
            "required": false,
            "description": "Exclude service orders with these statuses (comma-separated, e.g. ANU,FAC).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "awaiting_parts",
            "in": "query",
            "required": false,
            "description": "Filter by awaiting parts flag (true or 1 = waiting for parts, false or 0 = not waiting).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "awaiting_authorization",
            "in": "query",
            "required": false,
            "description": "Filter by awaiting authorization flag (true or 1 = waiting for authorization, false or 0 = not waiting).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Start date filter.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "End date filter.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "Filter by employee id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "seller_id",
            "in": "query",
            "required": false,
            "description": "Filter by seller id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "vehicle_id",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle internal id.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "total",
            "in": "query",
            "required": false,
            "description": "Filter by total value (supports operator arrays like total[gte]=100).",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "payment_method_code",
            "in": "query",
            "required": false,
            "description": "Filter by payment method code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Filter by document type code (tipo).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "description": "Filter by document type (tipodoc).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_number",
            "in": "query",
            "required": false,
            "description": "Filter by branch number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Global search on number, plate, customer name, and delivery name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field, prefixed with - for descending (e.g. -date). Ties are ordered by number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor taken from meta.next or meta.previous; omit it for the first page. A cursor that was changed, or that was issued for another sort, answers 422 INVALID_CURSOR. There are no page numbers: sending page answers 422.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListServiceOrderDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "cursor",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create service order",
        "description": "Creates a service order using the v2 modern payload.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:ordservico:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "description": "Vehicle plate."
                  },
                  "customer_id": {
                    "type": "integer",
                    "description": "Billing customer id. When omitted it is inferred from vehicle."
                  },
                  "km_counter": {
                    "type": "number",
                    "description": "Current odometer value."
                  },
                  "observations": {
                    "type": "string",
                    "description": "General observations."
                  },
                  "department_id": {
                    "type": "integer",
                    "description": "Workshop department id."
                  },
                  "appointment_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Appointment date."
                  },
                  "appointment_interval": {
                    "type": "string",
                    "description": "Appointment interval in HH:MM-HH:MM format."
                  },
                  "expected_delivery_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Planned delivery date."
                  },
                  "awaiting_authorization": {
                    "type": "boolean",
                    "description": "Marks the service order as awaiting authorization."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ESP",
                      "RAS"
                    ]
                  },
                  "currency_code": {
                    "type": "string"
                  },
                  "series": {
                    "type": "string"
                  },
                  "reception_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "signature": {
                    "type": "string"
                  },
                  "image_vehicle": {
                    "type": "string"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "article_id": {
                          "type": "string"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "unit_price": {
                          "type": "number"
                        },
                        "discount": {
                          "type": "number"
                        },
                        "vat_id": {
                          "type": "string"
                        },
                        "reason_exemption_vat": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "article_id",
                        "quantity",
                        "unit_price"
                      ]
                    },
                    "description": "Service order lines."
                  },
                  "interventions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "estimated_time": {
                          "type": "number"
                        }
                      }
                    },
                    "description": "Optional service order interventions."
                  }
                },
                "required": [
                  "plate",
                  "lines"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Service order created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateServiceOrderDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/drafts": {
      "post": {
        "summary": "Create draft service order",
        "description": "Creates a new service order in draft status (RAS). Supports upsert if num is provided.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "storeDraft",
          "privileges": [
            "oficinas:ordservico:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer"
                  },
                  "plate": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "num": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date"
                  },
                  "observations": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 5000
                  },
                  "mechanic_observations": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 5000
                  },
                  "mechanic_id": {
                    "type": "integer",
                    "nullable": true
                  },
                  "km_counter": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 0
                  },
                  "previous_km_counter": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 0
                  },
                  "seller_id": {
                    "type": "integer",
                    "nullable": true
                  },
                  "payment_method_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 10
                  },
                  "priority": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 0,
                    "maximum": 10
                  },
                  "classification": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 0
                  },
                  "department_id": {
                    "type": "integer",
                    "nullable": true,
                    "minimum": 0
                  },
                  "planned_delivery_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time"
                  },
                  "reception_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time"
                  },
                  "collection_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time"
                  },
                  "reference": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 100
                  },
                  "claim_id": {
                    "type": "integer",
                    "nullable": true
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "nullable": true
                  },
                  "location_id": {
                    "type": "integer",
                    "nullable": true
                  },
                  "intervention_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "customer_id",
                  "plate"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DraftServiceOrderOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-order-statuses": {
      "get": {
        "summary": "List service order statuses",
        "description": "Returns all configured service order statuses ordered by display order. The description column stores a language-dictionary key on the statuses shipped with the product and free text on the ones a tenant adds; both are resolved here, so the response always carries text a client can display.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}": {
      "get": {
        "summary": "Get service order details",
        "description": "Returns one service order with lines, extra lines and interventions.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service order details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderDetailsDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update service order extras",
        "description": "Updates department, warehouse, location, classification, mechanic and panel visibility on a service order.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "department_id": {
                    "type": "integer",
                    "description": "Department id (departamentos.id)."
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "description": "Warehouse id (lojas.CodLoja)."
                  },
                  "location_id": {
                    "type": "integer",
                    "description": "Location id (localizacoes.id); must belong to warehouse_id."
                  },
                  "classification_id": {
                    "type": "integer",
                    "description": "Classification id (ordemservico_classificacao.id)."
                  },
                  "mechanic_id": {
                    "type": "integer",
                    "description": "Mechanic id (empreg.CodEmpr); must be active and assigned to MECANICOS panel."
                  },
                  "show_in_mechanic_panel": {
                    "type": "boolean",
                    "enum": [
                      false,
                      true
                    ],
                    "description": "Whether to show service order on mechanics panel."
                  },
                  "seller_id": {
                    "type": "integer",
                    "description": "Seller id (represnt.CodRepres); must be active."
                  },
                  "employee_id": {
                    "type": "integer",
                    "description": "Employee id (empreg.CodEmpr); must be active."
                  },
                  "expected_delivery_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Planned delivery date (Y-m-d)."
                  },
                  "collection_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Vehicle collection datetime (Y-m-d H:i:s)."
                  },
                  "effective_delivery_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Effective vehicle delivery datetime (Y-m-d H:i:s)."
                  },
                  "effective_delivery_km": {
                    "type": "number",
                    "description": "Vehicle km counter on effective delivery."
                  },
                  "vehicle_delivery": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      2
                    ],
                    "description": "Vehicle delivery status: 0 not authorized, 1 authorized, 2 delivered."
                  },
                  "observations": {
                    "type": "string",
                    "description": "Service order observations (Obs.); HTML allowed."
                  },
                  "mechanic_observations": {
                    "type": "string",
                    "description": "Technical/mechanic observations (Obs. Tecnico); HTML allowed."
                  },
                  "print_observations_on_invoice": {
                    "type": "boolean",
                    "description": "Whether to print the observations on the document. Replaces invoice_observations."
                  },
                  "print_mechanic_observations_on_invoice": {
                    "type": "boolean",
                    "description": "Whether to print the technical observations on the document. Replaces mechanic_invoice_observations."
                  },
                  "invoice_observations": {
                    "type": "boolean",
                    "deprecated": true,
                    "description": "Deprecated (sunset 2027-02-28), use print_observations_on_invoice."
                  },
                  "mechanic_invoice_observations": {
                    "type": "boolean",
                    "deprecated": true,
                    "description": "Deprecated (sunset 2027-02-28), use print_mechanic_observations_on_invoice."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderDetailsDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/next-statuses": {
      "get": {
        "summary": "List next allowed statuses",
        "description": "Returns the statuses the service order can transition to (table-driven plus the legacy fixed set ESP/ENT/FAC).",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderNextStatusOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/interventions": {
      "get": {
        "summary": "List service order interventions",
        "description": "Returns interventions for one service order.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service order interventions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderInterventionDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add intervention to service order",
        "description": "Attaches a single intervention to the service order with auto-incremented NSeq.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderInterventionPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:apoio:intervencao:new"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intervention_id": {
                    "type": "integer",
                    "description": "Intervention catalog id (tiposintervencao.ID)."
                  },
                  "estimated_time": {
                    "type": "number",
                    "description": "Estimated time in minutes; defaults to catalog TempoPrevisto."
                  },
                  "observations": {
                    "type": "string",
                    "description": "Free-form observations."
                  },
                  "priority": {
                    "type": "integer",
                    "description": "Priority value."
                  },
                  "extra_description": {
                    "type": "string",
                    "description": "Additional description."
                  }
                },
                "required": [
                  "intervention_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderInterventionDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/flow-docs": {
      "get": {
        "summary": "List service order flow documents",
        "description": "Returns related flow documents for one service order.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service order flow documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderFlowDocumentDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/images": {
      "get": {
        "summary": "List service order images",
        "description": "Returns images for one service order.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:ordservico"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service order images",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderImageDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/awaiting-parts": {
      "patch": {
        "summary": "Toggle awaiting parts",
        "description": "Sets a_aguardar_pecas; on transition false->true creates state history.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "awaiting_parts": {
                    "type": "boolean",
                    "description": "Awaiting parts state."
                  }
                },
                "required": [
                  "awaiting_parts"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderDetailsDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/awaiting-authorization": {
      "patch": {
        "summary": "Toggle awaiting authorization",
        "description": "Sets a_aguardar_autorizacao; on transition false->true creates state history and dispatches notification.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "awaiting_authorization": {
                    "type": "boolean",
                    "description": "Awaiting authorization state."
                  }
                },
                "required": [
                  "awaiting_authorization"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderDetailsDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/status": {
      "patch": {
        "summary": "Update service order status",
        "description": "Updates the service order status respecting the allowed transitions and the legacy fixed set ESP/ENT/FAC.",
        "tags": [
          "Workshop",
          "Service Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:ordservico:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "next_status": {
                    "type": "string",
                    "maxLength": 3,
                    "description": "Target status code (3 chars)."
                  },
                  "current_status": {
                    "type": "string",
                    "maxLength": 3,
                    "description": "Expected current status code (concurrency guard)."
                  },
                  "reason_code": {
                    "type": "string",
                    "description": "Reason code; required when next_status is ENT or FAC."
                  },
                  "process_id": {
                    "type": "integer",
                    "description": "Workshop process id; reopens process when next_status is ESP."
                  }
                },
                "required": [
                  "next_status",
                  "current_status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceOrderDetailsDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/dms/ocr": {
      "post": {
        "summary": "Start a supplier invoice OCR reading",
        "description": "Sends a PDF attachment to the OCR service and returns the handle used to poll the result.",
        "tags": [
          "DMS",
          "Invoice OCR"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Dms\\Ocr\\Policies\\InvoiceOcrPolicy",
          "ability": "view",
          "privileges": [
            "dms:dashboard:folders:inbox"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "attachment_id": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Attachment id returned by POST /api/v2/attachments. Must be a PDF."
                  }
                },
                "required": [
                  "attachment_id"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InvoiceOcrStartOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "The organization does not have access to the invoice OCR AI feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Invalid attachment_id, attachment is not a PDF, or its file is unreadable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "503": {
            "description": "The OCR service is unavailable or the tenant has no valid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/dms/ocr/{ocrId}": {
      "get": {
        "summary": "Read the result of a supplier invoice OCR",
        "description": "Returns the reading state and, once completed, the extracted invoice resolved against tenant data.",
        "tags": [
          "DMS",
          "Invoice OCR"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Dms\\Ocr\\Policies\\InvoiceOcrPolicy",
          "ability": "view",
          "privileges": [
            "dms:dashboard:folders:inbox"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "ocrId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InvoiceOcrResultOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "The organization does not have access to the invoice OCR AI feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "The ocr_id was not issued by this tenant or its handle expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "503": {
            "description": "The OCR service is unavailable or the tenant has no valid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/validate-login": {
      "post": {
        "summary": "Validate entity web login",
        "description": "Dual-mode endpoint. When login is provided without password or hash, returns {available: true|false}. When login is provided with password or hash, validates credentials and returns {validated: true|false} with login_id/entity_id/entity_type on success. Always returns HTTP 200. Hooks api_v2_entities_validatelogin_validated_true and api_v2_entities_validatelogin_validated_false are fired by the Action; the _false hook may return a fallback auth array to short-circuit as success.",
        "tags": [
          "Entities"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Common\\Policies\\EntityPolicy",
          "ability": "viewAny",
          "privileges": [
            "entidades"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string",
                    "description": "Web login username.",
                    "example": "john.doe"
                  },
                  "password": {
                    "type": "string",
                    "nullable": true,
                    "description": "Plain-text password. Optional when hash is provided; when both login and password/hash are missing the endpoint falls back to availability check.",
                    "example": "secret"
                  },
                  "hash": {
                    "type": "string",
                    "nullable": true,
                    "description": "Pre-computed sha1(md5(password)) hash. Takes precedence over password when both are provided.",
                    "example": "5e884898da28047151d0e56f8dc6292773603d0d"
                  },
                  "ip": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 45,
                    "description": "IP address to record in the web_login entry. Falls back to the request IP when omitted.",
                    "example": "192.168.1.10"
                  }
                },
                "required": [
                  "login"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidateEntityLoginOutputDTO"
                    },
                    {
                      "$ref": "#/components/schemas/LoginAvailabilityOutputDTO"
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/parameters": {
      "get": {
        "summary": "Get every parameter grouped by module and topic",
        "description": "Filter with ?module=sales,stocks and ?topic=documents. Secret parameters are masked.",
        "tags": [
          "Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Parameters grouped by module and topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Module name to its topics.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Topic name to its parameters.",
                        "additionalProperties": {
                          "type": "object",
                          "description": "Parameter name to its value.",
                          "additionalProperties": {
                            "nullable": true,
                            "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "integer"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "integer"
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": true
                              }
                            ]
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update parameters across modules",
        "description": "Partial update. Payload is module -> topic -> parameter. Returns the reloaded state.",
        "tags": [
          "Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "general": {
                    "type": "object",
                    "properties": {
                      "defaults": {
                        "type": "object",
                        "properties": {
                          "barcode_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "barcode_magnitude": {
                            "type": "string",
                            "nullable": true
                          },
                          "interleaved_2of5_digits": {
                            "type": "string",
                            "nullable": true
                          },
                          "store": {
                            "type": "string",
                            "nullable": true
                          },
                          "vat_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "vat_exemption_reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "profit_margin": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_extra_currency": {
                            "type": "boolean"
                          },
                          "country": {
                            "type": "string",
                            "nullable": true
                          },
                          "payment_method": {
                            "type": "string",
                            "nullable": true
                          },
                          "task_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "cash_register": {
                            "type": "string",
                            "nullable": true
                          },
                          "customer_classification": {
                            "type": "string",
                            "nullable": true
                          },
                          "automated_employee": {
                            "type": "string",
                            "nullable": true
                          },
                          "ao_uses_vat": {
                            "type": "boolean"
                          },
                          "period": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "weekly",
                              "monthly",
                              "quarterly",
                              "semiannual"
                            ]
                          },
                          "article_code_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "0",
                              "1",
                              "2",
                              "3",
                              "4",
                              "5",
                              "6",
                              "7"
                            ]
                          },
                          "article_code_separator": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "documents": {
                        "type": "object",
                        "properties": {
                          "default_series": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_series": {
                            "type": "boolean"
                          },
                          "uses_series_background_image": {
                            "type": "boolean"
                          },
                          "days_to_change": {
                            "type": "string",
                            "nullable": true
                          },
                          "scroll_lines": {
                            "type": "integer"
                          },
                          "print_country": {
                            "type": "boolean"
                          }
                        }
                      },
                      "email": {
                        "type": "object",
                        "properties": {
                          "smtp_provider": {
                            "type": "string",
                            "nullable": true
                          },
                          "smtp_host": {
                            "type": "string",
                            "nullable": true
                          },
                          "smtp_port": {
                            "type": "integer"
                          },
                          "smtp_encryption": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "ssl",
                              "tls"
                            ]
                          },
                          "uses_smtp_auth": {
                            "type": "boolean"
                          },
                          "smtp_user": {
                            "type": "string",
                            "nullable": true
                          },
                          "smtp_password": {
                            "type": "string",
                            "nullable": true
                          },
                          "from_address": {
                            "type": "string",
                            "nullable": true,
                            "format": "email"
                          },
                          "from_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "from_sender_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "company",
                              "employee",
                              "company_reply_to_employee"
                            ]
                          },
                          "default_address": {
                            "type": "string",
                            "nullable": true
                          },
                          "bcc_address": {
                            "type": "string",
                            "nullable": true,
                            "format": "email"
                          },
                          "sent_folder": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "notifications": {
                        "type": "object",
                        "properties": {
                          "uses_sounds": {
                            "type": "boolean"
                          },
                          "warn_on_document_status_change": {
                            "type": "boolean"
                          },
                          "document_status_change_types": {
                            "type": "array"
                          }
                        }
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "regulation_source": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "attachment",
                              "template"
                            ]
                          },
                          "regulation_template": {
                            "type": "string",
                            "nullable": true
                          },
                          "request_letter": {
                            "type": "string",
                            "nullable": true
                          },
                          "acceptance_letter": {
                            "type": "string",
                            "nullable": true
                          },
                          "rejection_letter": {
                            "type": "string",
                            "nullable": true
                          },
                          "data_processing_question": {
                            "type": "string",
                            "nullable": true
                          },
                          "mailing_question": {
                            "type": "string",
                            "nullable": true
                          },
                          "require_regulation_on_new_entity": {
                            "type": "boolean"
                          },
                          "require_terms_acceptance": {
                            "type": "boolean"
                          },
                          "add_signature_placeholder": {
                            "type": "boolean"
                          }
                        }
                      },
                      "security": {
                        "type": "object",
                        "properties": {
                          "session_timeout": {
                            "type": "integer"
                          },
                          "skip_session_ip_validation": {
                            "type": "boolean"
                          },
                          "uses_sms_login": {
                            "type": "boolean"
                          },
                          "sms_login_cookie_duration": {
                            "type": "integer"
                          },
                          "panel_user": {
                            "type": "string",
                            "nullable": true
                          },
                          "panel_password": {
                            "type": "string",
                            "nullable": true
                          },
                          "panel_password_salt": {
                            "type": "string",
                            "nullable": true
                          },
                          "panel_uses_keyboard": {
                            "type": "boolean"
                          },
                          "panel_limit_by_ip": {
                            "type": "boolean"
                          },
                          "panel_allowed_ips": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "entities": {
                        "type": "object",
                        "properties": {
                          "auto_create": {
                            "type": "boolean"
                          },
                          "validate_postal_code": {
                            "type": "boolean"
                          },
                          "uses_interleaved": {
                            "type": "boolean"
                          },
                          "uses_customer_templates": {
                            "type": "boolean"
                          },
                          "required_fields_prospect": {
                            "type": "array"
                          },
                          "required_fields_customer": {
                            "type": "array"
                          },
                          "required_fields_supplier": {
                            "type": "array"
                          },
                          "required_fields_sales_rep": {
                            "type": "array"
                          },
                          "required_fields_customer_template": {
                            "type": "array"
                          }
                        }
                      },
                      "interface": {
                        "type": "object",
                        "properties": {
                          "max_browse_records": {
                            "type": "string",
                            "nullable": true
                          },
                          "grid_page_size": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "10",
                              "25",
                              "50",
                              "100",
                              "250",
                              "500"
                            ]
                          },
                          "shows_only_active": {
                            "type": "boolean"
                          },
                          "auto_search": {
                            "type": "boolean"
                          },
                          "replaces_decimal_point_with_comma": {
                            "type": "boolean"
                          },
                          "sort_product_search_by_stock": {
                            "type": "boolean"
                          }
                        }
                      },
                      "api": {
                        "type": "object",
                        "properties": {
                          "sales_document_validates_series": {
                            "type": "boolean"
                          },
                          "sales_document_validates_stores": {
                            "type": "boolean"
                          },
                          "sales_document_validates_advanced_management_stores": {
                            "type": "boolean"
                          },
                          "sales_document_validated_types": {
                            "type": "array"
                          },
                          "sales_document_types_excluded_from_stock_validation": {
                            "type": "array"
                          },
                          "panel_web_api_key": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "sales": {
                    "type": "object",
                    "properties": {
                      "documents": {
                        "type": "object",
                        "properties": {
                          "line_columns": {
                            "type": "array"
                          },
                          "default_seller_source": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "customer",
                              "employee"
                            ]
                          },
                          "shipping_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "max_days_to_cancel": {
                            "type": "integer"
                          },
                          "quote_validity_days": {
                            "type": "integer"
                          },
                          "require_credit_note_reason": {
                            "type": "boolean"
                          },
                          "uses_fuel_sales": {
                            "type": "boolean"
                          },
                          "separate_lines_by_origin_document": {
                            "type": "boolean"
                          },
                          "required_line_fields": {
                            "type": "array"
                          },
                          "auto_copy_commercial_info": {
                            "type": "boolean"
                          },
                          "auto_copy_observations": {
                            "type": "boolean"
                          },
                          "max_simplified_invoice_amount_taxable": {
                            "type": "integer"
                          },
                          "max_simplified_invoice_amount_non_taxable": {
                            "type": "integer"
                          },
                          "warn_on_line_delete": {
                            "type": "boolean"
                          },
                          "show_line_discount": {
                            "type": "boolean"
                          },
                          "show_unit_price_with_vat": {
                            "type": "boolean"
                          },
                          "auto_value_return": {
                            "type": "boolean"
                          },
                          "search_by_barcode": {
                            "type": "boolean"
                          }
                        }
                      },
                      "pricing": {
                        "type": "object",
                        "properties": {
                          "profit_margin_cost_basis": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "cost_price",
                              "last_cost_price",
                              "average_cost_price"
                            ]
                          },
                          "show_profit_margin_on_document": {
                            "type": "boolean"
                          },
                          "commissions_on_total_without_vat": {
                            "type": "boolean"
                          },
                          "lookup_article_price_list": {
                            "type": "boolean"
                          },
                          "lookup_customer_price_list": {
                            "type": "boolean"
                          },
                          "lookup_classification_discount_table": {
                            "type": "boolean"
                          }
                        }
                      },
                      "stock": {
                        "type": "object",
                        "properties": {
                          "show_only_batches_with_quantity": {
                            "type": "boolean"
                          },
                          "uses_temporary_batches_on_orders": {
                            "type": "boolean"
                          },
                          "allow_selling_batches_without_stock": {
                            "type": "boolean"
                          },
                          "asset_movement_warehouse": {
                            "type": "string",
                            "nullable": true
                          },
                          "delivery_note_updates_stock_value": {
                            "type": "boolean"
                          },
                          "uses_equivalent_articles": {
                            "type": "boolean"
                          }
                        }
                      },
                      "warnings": {
                        "type": "object",
                        "properties": {
                          "block_final_consumer_invoices": {
                            "type": "boolean"
                          },
                          "negative_profit_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "negative_profit_per_line_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "doubtful_customer_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "litigious_customer_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "price_list_warning_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn"
                            ]
                          },
                          "credit_limit_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "service_order_credit_limit_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "credit_limit_includes_orders": {
                            "type": "boolean"
                          },
                          "credit_limit_extra_document_types": {
                            "type": "array"
                          },
                          "negative_stock_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "minimum_stock_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "pending_documents_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "pending_documents_includes_orders": {
                            "type": "boolean"
                          },
                          "pending_control_mode": {
                            "type": "string",
                            "nullable": true
                          },
                          "ordered_articles_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "sell_below_last_cost_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "restrict_sales_to_employee_default_store": {
                            "type": "boolean"
                          },
                          "zero_unit_price_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "min_profit_margin_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "min_profit_margin_percentage": {
                            "type": "number"
                          },
                          "order_stock_warning_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "duplicate_article_document_types": {
                            "type": "array"
                          },
                          "pending_stock_message": {
                            "type": "string",
                            "nullable": true
                          },
                          "pending_stock_document_types": {
                            "type": "array"
                          },
                          "pending_stock_origin_document_types": {
                            "type": "array"
                          }
                        }
                      },
                      "printing": {
                        "type": "object",
                        "properties": {
                          "letter_header": {
                            "type": "string",
                            "nullable": true
                          },
                          "letter_footer": {
                            "type": "string",
                            "nullable": true
                          },
                          "document_language": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_original_pdf_button": {
                            "type": "boolean"
                          }
                        }
                      },
                      "shipping": {
                        "type": "object",
                        "properties": {
                          "default_method": {
                            "type": "string",
                            "nullable": true
                          },
                          "unload_time_offset_hours": {
                            "type": "integer"
                          },
                          "print_delivery_methods": {
                            "type": "boolean"
                          },
                          "vehicle_plates": {
                            "type": "array"
                          }
                        }
                      },
                      "receipts": {
                        "type": "object",
                        "properties": {
                          "withholding_percentage": {
                            "type": "number"
                          },
                          "min_withholding_amount": {
                            "type": "number"
                          },
                          "allow_over_direct_entries": {
                            "type": "boolean"
                          },
                          "list_direct_entries": {
                            "type": "boolean"
                          },
                          "uses_advances": {
                            "type": "boolean"
                          },
                          "advances_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "credit_note",
                              "document_line"
                            ]
                          }
                        }
                      },
                      "notifications": {
                        "type": "object",
                        "properties": {
                          "email_document_types": {
                            "type": "array"
                          }
                        }
                      }
                    }
                  },
                  "purchases": {
                    "type": "object",
                    "properties": {
                      "documents": {
                        "type": "object",
                        "properties": {
                          "line_columns": {
                            "type": "array"
                          },
                          "required_line_fields": {
                            "type": "array"
                          },
                          "activate_subsequent_stock_movement": {
                            "type": "boolean"
                          },
                          "uses_self_billing": {
                            "type": "boolean"
                          },
                          "associate_article_code_to_supplier": {
                            "type": "boolean"
                          }
                        }
                      },
                      "articles": {
                        "type": "object",
                        "properties": {
                          "auto_update_selling_price": {
                            "type": "boolean"
                          },
                          "auto_update_selling_price_type": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "all",
                              "standard",
                              "service"
                            ]
                          },
                          "zero_discount_margin_percentage": {
                            "type": "integer"
                          },
                          "find_complementary_articles": {
                            "type": "boolean"
                          },
                          "include_supplier_codes_in_search": {
                            "type": "boolean"
                          }
                        }
                      },
                      "pricing": {
                        "type": "object",
                        "properties": {
                          "supplier_suggested_price_source": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "last_purchase_price",
                              "agreed_price",
                              "cost_price"
                            ]
                          },
                          "autofill_last_discount": {
                            "type": "boolean"
                          },
                          "cost_price_equals_last_cost": {
                            "type": "boolean"
                          }
                        }
                      },
                      "costs": {
                        "type": "object",
                        "properties": {
                          "uses_cost_allocation": {
                            "type": "boolean"
                          },
                          "uses_customs_cost_allocation": {
                            "type": "boolean"
                          },
                          "customs_duties_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "customs_fees_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "customs_remainder_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "shipping_article": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "currency": {
                        "type": "object",
                        "properties": {
                          "uses_exchange_differences": {
                            "type": "boolean"
                          },
                          "exchange_difference_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "bank_operation",
                              "document_value"
                            ]
                          },
                          "favorable_exchange_entry_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "unfavorable_exchange_entry_type": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "warnings": {
                        "type": "object",
                        "properties": {
                          "supplier_minimum_quantity_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "supplier_bundle_quantity_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "zero_unit_price_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "alert_on_price_change": {
                            "type": "boolean"
                          }
                        }
                      },
                      "suppliers": {
                        "type": "object",
                        "properties": {
                          "final_consumer_suppliers": {
                            "type": "array"
                          },
                          "restrict_to_authorized": {
                            "type": "boolean"
                          }
                        }
                      },
                      "notifications": {
                        "type": "object",
                        "properties": {
                          "email_document_types": {
                            "type": "array"
                          }
                        }
                      }
                    }
                  },
                  "stocks": {
                    "type": "object",
                    "properties": {
                      "pricing": {
                        "type": "object",
                        "properties": {
                          "default_retail_price_field": {
                            "type": "string",
                            "nullable": true
                          },
                          "margin_calculation_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "selling_price",
                              "profit_margin",
                              "ask"
                            ]
                          },
                          "margin_calculation_base": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "cost_price",
                              "selling_price"
                            ]
                          },
                          "kit_cost_price_field": {
                            "type": "string",
                            "nullable": true
                          },
                          "profit_margin_type": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "barcodes": {
                        "type": "object",
                        "properties": {
                          "default_type": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "EAN-13",
                              "CODE128"
                            ]
                          },
                          "generate_when_missing": {
                            "type": "boolean"
                          },
                          "auto_create": {
                            "type": "boolean"
                          }
                        }
                      },
                      "families": {
                        "type": "object",
                        "properties": {
                          "allow_change": {
                            "type": "boolean"
                          },
                          "auto_fill_article": {
                            "type": "boolean"
                          },
                          "change_article_code": {
                            "type": "boolean"
                          },
                          "auto_fill_article_code": {
                            "type": "boolean"
                          },
                          "sub_family_usage": {
                            "type": "string",
                            "nullable": true
                          },
                          "sub_sub_family_usage": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "stock": {
                        "type": "object",
                        "properties": {
                          "uses_serial_numbers": {
                            "type": "boolean"
                          },
                          "control_by_document_line": {
                            "type": "boolean"
                          },
                          "uses_third_party_batches": {
                            "type": "boolean"
                          },
                          "show_location_in_movements_and_recounts": {
                            "type": "boolean"
                          },
                          "open_recounts_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          }
                        }
                      },
                      "articles": {
                        "type": "object",
                        "properties": {
                          "uses_dimensional_spaces": {
                            "type": "boolean"
                          },
                          "uses_dimensional_spaces_legacy": {
                            "type": "boolean"
                          },
                          "auto_build_kits": {
                            "type": "boolean"
                          },
                          "uses_alternative_units": {
                            "type": "boolean"
                          },
                          "required_fields": {
                            "type": "array"
                          }
                        }
                      }
                    }
                  },
                  "crm": {
                    "type": "object",
                    "properties": {
                      "agenda": {
                        "type": "object",
                        "properties": {
                          "default_view": {
                            "type": "string"
                          },
                          "show_business_days": {
                            "type": "boolean"
                          },
                          "business_days": {
                            "type": "array"
                          },
                          "business_hours_start": {
                            "type": "string",
                            "nullable": true
                          },
                          "business_hours_end": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_time_start": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_time_end": {
                            "type": "string",
                            "nullable": true
                          },
                          "hidden_days": {
                            "type": "array"
                          },
                          "color_mode": {
                            "type": "string",
                            "enum": [
                              "completed",
                              "category",
                              "employee"
                            ]
                          },
                          "allow_appointments_on_holidays": {
                            "type": "boolean"
                          },
                          "allow_appointments_on_vacations": {
                            "type": "boolean"
                          },
                          "allow_appointments_on_absences": {
                            "type": "boolean"
                          },
                          "allow_appointments_outside_business_hours": {
                            "type": "boolean"
                          },
                          "employee_concurrent_appointments": {
                            "type": "number"
                          },
                          "appointment_state_notifications": {
                            "type": "boolean"
                          },
                          "orientation": {
                            "type": "string",
                            "enum": [
                              "horizontal",
                              "vertical"
                            ]
                          },
                          "column_width": {
                            "type": "integer",
                            "minimum": 80,
                            "maximum": 400
                          },
                          "agenda_order_departments": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 1
                            }
                          },
                          "agenda_order_employees": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 1
                            }
                          },
                          "employees_visibility": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "employee_id": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "visible": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      },
                      "notifications": {
                        "type": "object",
                        "properties": {
                          "notify_customer": {
                            "type": "boolean"
                          },
                          "notify_origin_contact": {
                            "type": "boolean"
                          },
                          "notify_customer_on_phase_change": {
                            "type": "boolean"
                          },
                          "notify_employee": {
                            "type": "boolean"
                          },
                          "notify_seller": {
                            "type": "boolean"
                          }
                        }
                      },
                      "appointments": {
                        "type": "object",
                        "properties": {
                          "default_days_ahead": {
                            "type": "integer"
                          },
                          "notify_by_email_default": {
                            "type": "boolean"
                          },
                          "notify_by_sms_default": {
                            "type": "boolean"
                          }
                        }
                      },
                      "email": {
                        "type": "object",
                        "properties": {
                          "send_limit": {
                            "type": "integer"
                          },
                          "default_to_contact_type": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "preferential",
                              "financial",
                              "commercial"
                            ]
                          },
                          "default_cc_contact_type": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "preferential",
                              "financial",
                              "commercial"
                            ]
                          },
                          "default_bcc_contact_type": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "preferential",
                              "financial",
                              "commercial"
                            ]
                          }
                        }
                      },
                      "opportunities": {
                        "type": "object",
                        "properties": {
                          "document_types": {
                            "type": "array"
                          },
                          "min_value": {
                            "type": "number"
                          }
                        }
                      },
                      "vouchers": {
                        "type": "object",
                        "properties": {
                          "uses_gift_voucher": {
                            "type": "boolean"
                          },
                          "gift_voucher_article": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "general": {
                        "type": "object",
                        "properties": {
                          "uses_internal_chat": {
                            "type": "boolean"
                          },
                          "reference_type_requirement": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "optional",
                              "required"
                            ]
                          }
                        }
                      },
                      "calendar": {
                        "type": "object",
                        "properties": {
                          "uses_legacy_week_view": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  },
                  "workshop": {
                    "type": "object",
                    "properties": {
                      "agenda": {
                        "type": "object",
                        "properties": {
                          "default_view": {
                            "type": "string"
                          },
                          "show_business_days": {
                            "type": "boolean"
                          },
                          "business_days": {
                            "type": "array"
                          },
                          "business_hours_start": {
                            "type": "string",
                            "nullable": true
                          },
                          "business_hours_end": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_time_start": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_time_end": {
                            "type": "string",
                            "nullable": true
                          },
                          "hidden_days": {
                            "type": "array"
                          },
                          "allocated_time_margin_percentage": {
                            "type": "number"
                          },
                          "group_by_mechanic": {
                            "type": "boolean"
                          },
                          "group_by_department": {
                            "type": "boolean"
                          },
                          "allow_appointments_on_holidays": {
                            "type": "boolean"
                          },
                          "allow_appointments_on_vacations": {
                            "type": "boolean"
                          },
                          "allow_appointments_on_absences": {
                            "type": "boolean"
                          },
                          "allow_appointments_outside_business_hours": {
                            "type": "boolean"
                          },
                          "employee_concurrent_appointments": {
                            "type": "number"
                          },
                          "intervention_groups_enabled": {
                            "type": "boolean"
                          },
                          "reception_delivery_single_event": {
                            "type": "boolean"
                          },
                          "reception_delivery_order": {
                            "type": "string",
                            "enum": [
                              "by_time",
                              "receptions_first",
                              "deliveries_first"
                            ]
                          },
                          "timeline_occupancy_enabled": {
                            "type": "boolean"
                          },
                          "service_order_creation": {
                            "type": "string",
                            "enum": [
                              "none",
                              "draft",
                              "issued"
                            ]
                          },
                          "service_order_initial_status": {
                            "type": "string",
                            "nullable": true,
                            "description": "Valid value from ordemservico_estados.code."
                          },
                          "split_planning_enabled": {
                            "type": "boolean"
                          },
                          "appointment_state_notifications": {
                            "type": "boolean"
                          },
                          "notify_by_email_default": {
                            "type": "boolean"
                          },
                          "notify_by_sms_default": {
                            "type": "boolean"
                          },
                          "min_segment_minutes": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "max_segments": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "max_spill_days": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "heatmap_days": {
                            "type": "integer",
                            "minimum": 3,
                            "maximum": 30
                          },
                          "heatmap_color_mode": {
                            "type": "string",
                            "enum": [
                              "accent",
                              "traffic_light"
                            ]
                          },
                          "heatmap_window_mode": {
                            "type": "string",
                            "enum": [
                              "days_from_reception",
                              "reception_to_delivery"
                            ]
                          },
                          "reception_without_service_order": {
                            "type": "boolean"
                          },
                          "delivery_without_service_order": {
                            "type": "boolean"
                          },
                          "color_mode": {
                            "type": "string",
                            "enum": [
                              "completed",
                              "category",
                              "employee",
                              "service_order"
                            ]
                          },
                          "orientation": {
                            "type": "string",
                            "enum": [
                              "horizontal",
                              "vertical"
                            ]
                          },
                          "column_width": {
                            "type": "integer",
                            "minimum": 80,
                            "maximum": 400
                          },
                          "reception_service_order_statuses": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "nullable": true,
                              "description": "Valid value from ordemservico_estados.code."
                            }
                          },
                          "delivery_service_order_statuses": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "nullable": true,
                              "description": "Valid value from ordemservico_estados.code."
                            }
                          },
                          "agenda_order_departments": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 1
                            }
                          },
                          "agenda_order_employees": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 1
                            }
                          },
                          "employees_visibility": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "employee_id": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "visible": {
                                  "type": "boolean"
                                }
                              }
                            }
                          },
                          "departments_visibility": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "department_id": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "visible": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      },
                      "service_orders": {
                        "type": "object",
                        "properties": {
                          "link_purchase_line_plate_to_last_open_order": {
                            "type": "boolean"
                          },
                          "purchase_plate_search_statuses": {
                            "type": "array"
                          },
                          "uses_checklist": {
                            "type": "boolean"
                          },
                          "default_checklists": {
                            "type": "array"
                          },
                          "required_fields": {
                            "type": "array"
                          },
                          "uses_service_articles_as_tasks": {
                            "type": "boolean"
                          },
                          "service_article_task_units": {
                            "type": "array"
                          },
                          "upcoming_agenda_days": {
                            "type": "integer"
                          },
                          "uses_legacy_agenda_week_view": {
                            "type": "boolean"
                          },
                          "default_labour_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "mobile_app_status_filter": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "all",
                              "completed_only"
                            ]
                          },
                          "process_observations_source": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "observations",
                              "internal_observations"
                            ]
                          },
                          "labour_units_for_internal_document": {
                            "type": "array"
                          },
                          "auto_inserted_articles": {
                            "type": "array"
                          },
                          "auto_inserted_interventions": {
                            "type": "array"
                          },
                          "show_employee_who_added_article": {
                            "type": "boolean"
                          },
                          "allow_invoicing_when_closed": {
                            "type": "boolean"
                          },
                          "auto_move_articles_to_extra": {
                            "type": "boolean"
                          },
                          "validate_checklist_on_close": {
                            "type": "boolean"
                          },
                          "print_customer_observations_by_default": {
                            "type": "boolean"
                          },
                          "print_technician_observations_by_default": {
                            "type": "boolean"
                          },
                          "statuses_blocked_awaiting_parts_or_authorization": {
                            "type": "array"
                          }
                        }
                      },
                      "documents": {
                        "type": "object",
                        "properties": {
                          "service_order_columns": {
                            "type": "array"
                          },
                          "service_order_extra_columns": {
                            "type": "array"
                          }
                        }
                      },
                      "stock": {
                        "type": "object",
                        "properties": {
                          "updated_by_service_orders": {
                            "type": "boolean"
                          },
                          "block_negative_on_service_orders": {
                            "type": "boolean"
                          },
                          "service_order_movement_type": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "pricing": {
                        "type": "object",
                        "properties": {
                          "labour_rate_1": {
                            "type": "number"
                          },
                          "labour_rate_2": {
                            "type": "number"
                          },
                          "labour_rate_3": {
                            "type": "number"
                          },
                          "show_process_profit_margin": {
                            "type": "boolean"
                          },
                          "show_process_profit_margin_percentage": {
                            "type": "boolean"
                          }
                        }
                      },
                      "technicians": {
                        "type": "object",
                        "properties": {
                          "session_timeout_minutes": {
                            "type": "integer"
                          },
                          "intervention_time_unit": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "minutes",
                              "hours"
                            ]
                          },
                          "time_tracking_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "service_order",
                              "intervention"
                            ]
                          },
                          "manages_operations": {
                            "type": "boolean"
                          },
                          "show_on_screen_keyboard": {
                            "type": "boolean"
                          },
                          "show_company_monthly_target": {
                            "type": "boolean"
                          },
                          "uses_equivalent_articles": {
                            "type": "boolean"
                          },
                          "filter_service_orders_by_department": {
                            "type": "boolean"
                          },
                          "auto_logout_on_order_close": {
                            "type": "boolean"
                          },
                          "lunch_end_time": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "vehicles": {
                        "type": "object",
                        "properties": {
                          "inspection_category": {
                            "type": "string",
                            "nullable": true
                          },
                          "default_typology": {
                            "type": "string",
                            "nullable": true
                          },
                          "oil_family": {
                            "type": "string",
                            "nullable": true
                          },
                          "tire_family": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_tire_management": {
                            "type": "boolean"
                          },
                          "required_fields_on_create": {
                            "type": "array"
                          }
                        }
                      },
                      "notifications": {
                        "type": "object",
                        "properties": {
                          "vehicle_with_open_service_order_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "service_order_pending_invoicing_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn"
                            ]
                          },
                          "service_order_without_technician_times_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn"
                            ]
                          },
                          "vehicle_with_open_quote_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn"
                            ]
                          },
                          "sms_excluded_statuses": {
                            "type": "array"
                          },
                          "authorization_responsible_employees": {
                            "type": "array"
                          }
                        }
                      },
                      "integrations": {
                        "type": "object",
                        "properties": {
                          "drive360_price_percentage": {
                            "type": "number"
                          },
                          "drive360_search_equivalent_references": {
                            "type": "boolean"
                          },
                          "drive360_auto_order": {
                            "type": "boolean"
                          },
                          "drive360_auto_order_employee": {
                            "type": "string",
                            "nullable": true
                          },
                          "drive360_auto_order_quantity": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "minimum_stock",
                              "replenishment_stock"
                            ]
                          },
                          "drive360_auto_order_times": {
                            "type": "array"
                          },
                          "uses_tecdoc_plate_lookup": {
                            "type": "boolean"
                          },
                          "datadrive_employee": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_maisvalor_v3": {
                            "type": "boolean"
                          },
                          "create_business_updates_sale_price": {
                            "type": "boolean"
                          },
                          "create_business_updates_families": {
                            "type": "boolean"
                          },
                          "create_business_updates_brands": {
                            "type": "boolean"
                          },
                          "create_business_supplier": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "document_chat": {
                        "type": "object",
                        "properties": {
                          "save_messages_as_notes": {
                            "type": "boolean"
                          },
                          "save_files_as_attachments": {
                            "type": "boolean"
                          },
                          "reflect_message_edits": {
                            "type": "boolean"
                          },
                          "reflect_message_deletions": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  },
                  "accounting": {
                    "type": "object",
                    "properties": {
                      "accounts": {
                        "type": "object",
                        "properties": {
                          "customer_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "customer_account_digits": {
                            "type": "integer"
                          },
                          "auto_customer_account": {
                            "type": "boolean"
                          },
                          "supplier_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "supplier_account_digits": {
                            "type": "integer"
                          },
                          "auto_supplier_account": {
                            "type": "boolean"
                          },
                          "customer_notes_receivable_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "customer_notes_receivable_account_digits": {
                            "type": "integer"
                          },
                          "customer_advance_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "customer_advance_account_digits": {
                            "type": "integer"
                          },
                          "auto_customer_advance_account": {
                            "type": "boolean"
                          },
                          "supplier_advance_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "supplier_advance_account_digits": {
                            "type": "integer"
                          },
                          "auto_supplier_advance_account": {
                            "type": "boolean"
                          },
                          "customer_advance_reverse_charge_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "customer_advance_reverse_charge_account_digits": {
                            "type": "integer"
                          },
                          "supplier_advance_reverse_charge_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "supplier_advance_reverse_charge_account_digits": {
                            "type": "integer"
                          },
                          "fixed_asset_supplier_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "fixed_asset_supplier_account_digits": {
                            "type": "integer"
                          },
                          "supplier_bills_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "supplier_bills_account_digits": {
                            "type": "integer"
                          },
                          "other_third_party_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "other_third_party_account_digits": {
                            "type": "integer"
                          },
                          "employee_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "employee_account_digits": {
                            "type": "integer"
                          },
                          "seller_base_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "seller_account_digits": {
                            "type": "integer"
                          },
                          "grouping_digits": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "0",
                              "1",
                              "2",
                              "3",
                              "4",
                              "5",
                              "6",
                              "7",
                              "8",
                              "9",
                              "10"
                            ]
                          }
                        }
                      },
                      "settlements": {
                        "type": "object",
                        "properties": {
                          "financial_discount_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "financial_discount_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "financial_income_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "financial_income_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "financial_discount_receipt_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "financial_discount_receipt_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "financial_income_payment_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "financial_income_payment_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "offsetting_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "bank_charges_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "positive_exchange_difference_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "negative_exchange_difference_account": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "rounding": {
                        "type": "object",
                        "properties": {
                          "positive_sales_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "positive_sales_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "negative_sales_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "negative_sales_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "positive_purchases_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "positive_purchases_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "negative_purchases_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "negative_purchases_cost_center": {
                            "type": "string",
                            "nullable": true
                          },
                          "positive_purchases_vat_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "negative_purchases_vat_account": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "vat": {
                        "type": "object",
                        "properties": {
                          "regime": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "monthly",
                              "quarterly"
                            ]
                          },
                          "uses_second_hand_margin_scheme": {
                            "type": "boolean"
                          },
                          "captive_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "captive_regularization_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "withholding_sales_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "withholding_purchases_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_withholding_on_receipt": {
                            "type": "boolean"
                          },
                          "uses_withholding_on_payment": {
                            "type": "boolean"
                          }
                        }
                      },
                      "markets": {
                        "type": "object",
                        "properties": {
                          "sales_digit_position": {
                            "type": "integer"
                          },
                          "sales_vat_digit_position": {
                            "type": "integer"
                          },
                          "purchases_digit_position": {
                            "type": "integer"
                          },
                          "purchases_vat_digit_position": {
                            "type": "integer"
                          },
                          "european_union_digit": {
                            "type": "integer"
                          },
                          "outside_european_union_digit": {
                            "type": "integer"
                          },
                          "uses_sales_journal": {
                            "type": "boolean"
                          },
                          "uses_purchases_journal": {
                            "type": "boolean"
                          }
                        }
                      },
                      "permanent_inventory": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "on_document",
                              "monthly",
                              "annual"
                            ]
                          },
                          "post_stock_movements": {
                            "type": "boolean"
                          },
                          "journal": {
                            "type": "string",
                            "nullable": true
                          },
                          "document": {
                            "type": "string",
                            "nullable": true
                          },
                          "purchases_accounts": {
                            "type": "array"
                          },
                          "goods_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "cost_of_goods_sold_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "cost_basis": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "document_average_cost",
                              "cost_recalculated_at_date"
                            ]
                          }
                        }
                      },
                      "fixed_assets": {
                        "type": "object",
                        "properties": {
                          "period_depreciation_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "accumulated_depreciation_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "capital_gains_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "capital_losses_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "sale_proceeds_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "disposal_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "write_off_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "revaluation_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "impairment_losses_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "impairment_reversal_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "accumulated_impairment_losses_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "revaluation_surplus_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "deferred_tax_liability_account": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "declarations": {
                        "type": "object",
                        "properties": {
                          "certified_accountant_tax_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "accountant_tax_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "declarant_tax_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "company_tax_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "tax_office_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "ies_accounting_framework": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "1",
                              "2",
                              "3",
                              "4",
                              "5"
                            ]
                          },
                          "head_office_location": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "mainland",
                              "azores",
                              "madeira"
                            ]
                          }
                        }
                      },
                      "entries": {
                        "type": "object",
                        "properties": {
                          "sales_credit_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "sales_debit_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "purchases_credit_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "purchases_debit_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_direct_entries": {
                            "type": "boolean"
                          },
                          "block_manual_account": {
                            "type": "boolean"
                          },
                          "date_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "AUTO",
                              "LAST",
                              "NONE"
                            ]
                          },
                          "default_article_classification": {
                            "type": "string",
                            "nullable": true
                          },
                          "default_service_classification": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "analytics": {
                        "type": "object",
                        "properties": {
                          "uses_cost_accounting": {
                            "type": "boolean"
                          },
                          "uses_cost_centers_in_general_ledger": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  },
                  "hr": {
                    "type": "object",
                    "properties": {
                      "payroll": {
                        "type": "object",
                        "properties": {
                          "minimum_wage": {
                            "type": "string",
                            "nullable": true
                          },
                          "meal_allowance_half_day_absence_discount": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "full",
                              "half_day",
                              "none"
                            ]
                          },
                          "revenue_drop_percentage": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "0",
                              "25",
                              "40",
                              "60",
                              "75"
                            ]
                          }
                        }
                      },
                      "declarations": {
                        "type": "object",
                        "properties": {
                          "tax_office_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "accountant_tax_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "declarant_tax_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "contribution_entity_tax_id_1": {
                            "type": "string",
                            "nullable": true
                          },
                          "contribution_entity_tax_id_2": {
                            "type": "string",
                            "nullable": true
                          },
                          "contribution_entity_tax_id_3": {
                            "type": "string",
                            "nullable": true
                          },
                          "social_security_entity_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "economic_activity_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "legal_nature_code": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "vacation": {
                        "type": "object",
                        "properties": {
                          "days_per_year": {
                            "type": "number"
                          },
                          "blocks_weekends": {
                            "type": "boolean"
                          }
                        }
                      },
                      "accounting": {
                        "type": "object",
                        "properties": {
                          "employees_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "governing_body_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "income_tax_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "social_security_company_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "social_security_employee_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "employee_charges_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "governing_body_charges_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "unions_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "labour_compensation_fund_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "labour_compensation_guarantee_fund_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "fund_payable_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "positive_rounding_account": {
                            "type": "string",
                            "nullable": true
                          },
                          "negative_rounding_account": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "social_security": {
                        "type": "object",
                        "properties": {
                          "employee_rate": {
                            "type": "number"
                          },
                          "employer_rate": {
                            "type": "number"
                          }
                        }
                      },
                      "attendance": {
                        "type": "object",
                        "properties": {
                          "weekly_hours": {
                            "type": "string",
                            "nullable": true
                          },
                          "work_days": {
                            "type": "integer"
                          },
                          "start_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "waiting_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_first_check_in_last_check_out": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  },
                  "ams": {
                    "type": "object",
                    "properties": {
                      "numbering": {
                        "type": "object",
                        "properties": {
                          "flight_attendance_number_format": {
                            "type": "string",
                            "nullable": true
                          },
                          "flight_supply_number_format": {
                            "type": "string",
                            "nullable": true
                          },
                          "passenger_attendance_number_format": {
                            "type": "string",
                            "nullable": true
                          },
                          "transport_service_number_format": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "workflow": {
                        "type": "object",
                        "properties": {
                          "handling_confirmation_statuses": {
                            "type": "string",
                            "nullable": true
                          },
                          "passenger_service_confirmation_statuses": {
                            "type": "string",
                            "nullable": true
                          },
                          "quality_control_sheet_header": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "agenda": {
                        "type": "object",
                        "properties": {
                          "default_view": {
                            "type": "string",
                            "nullable": true
                          },
                          "business_days": {
                            "type": "array"
                          },
                          "hidden_days": {
                            "type": "array"
                          },
                          "business_hours_start": {
                            "type": "string",
                            "nullable": true
                          },
                          "business_hours_end": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_time_start": {
                            "type": "string",
                            "nullable": true
                          },
                          "show_time_end": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "dms": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "object",
                        "properties": {
                          "email_provider": {
                            "type": "string",
                            "nullable": true
                          },
                          "email_host": {
                            "type": "string",
                            "nullable": true
                          },
                          "email_port": {
                            "type": "integer"
                          },
                          "email_protocol": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "imap",
                              "pop"
                            ]
                          },
                          "email_encryption": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "ssl",
                              "tls"
                            ]
                          },
                          "email_username": {
                            "type": "string",
                            "nullable": true
                          },
                          "email_password": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "ftp": {
                        "type": "object",
                        "properties": {
                          "ftp_server": {
                            "type": "string",
                            "nullable": true
                          },
                          "ftp_username": {
                            "type": "string",
                            "nullable": true
                          },
                          "ftp_password": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "microsoft": {
                        "type": "object",
                        "properties": {
                          "microsoft_client_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "microsoft_tenant_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "microsoft_redirect_uri": {
                            "type": "string",
                            "nullable": true
                          },
                          "microsoft_client_secret": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "wms": {
                    "type": "object",
                    "properties": {
                      "order_status": {
                        "type": "object",
                        "properties": {
                          "default": {
                            "type": "string",
                            "nullable": true
                          },
                          "incoming": {
                            "type": "string",
                            "nullable": true
                          },
                          "reposition": {
                            "type": "string",
                            "nullable": true
                          },
                          "recount": {
                            "type": "string",
                            "nullable": true
                          },
                          "packing": {
                            "type": "string",
                            "nullable": true
                          },
                          "shipping": {
                            "type": "string",
                            "nullable": true
                          },
                          "finish": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "logistics": {
                        "type": "object",
                        "properties": {
                          "minimum_area": {
                            "type": "number"
                          },
                          "minimum_volume": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  },
                  "tickets": {
                    "type": "object",
                    "properties": {
                      "defaults": {
                        "type": "object",
                        "properties": {
                          "default_status": {
                            "type": "string",
                            "nullable": true
                          },
                          "default_priority": {
                            "type": "string",
                            "nullable": true
                          },
                          "default_tag_format": {
                            "type": "string",
                            "nullable": true
                          },
                          "full_administrator_access_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "full_access",
                              "by_department"
                            ]
                          }
                        }
                      },
                      "fields": {
                        "type": "object",
                        "properties": {
                          "required_fields": {
                            "type": "array"
                          },
                          "message_history_enabled": {
                            "type": "boolean"
                          }
                        }
                      },
                      "public": {
                        "type": "object",
                        "properties": {
                          "public_url": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "subscriptions": {
                        "type": "object",
                        "properties": {
                          "subscription_required": {
                            "type": "boolean"
                          },
                          "auto_subscription": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  },
                  "subscriptions": {
                    "type": "object",
                    "properties": {
                      "invoicing": {
                        "type": "object",
                        "properties": {
                          "document_type_to_generate": {
                            "type": "string",
                            "nullable": true
                          },
                          "due_days": {
                            "type": "integer"
                          },
                          "invoicing_employee": {
                            "type": "string",
                            "nullable": true
                          },
                          "setup_article": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "notifications": {
                        "type": "object",
                        "properties": {
                          "send_email": {
                            "type": "boolean"
                          },
                          "send_email_on_manual_run": {
                            "type": "boolean"
                          },
                          "report_recipients": {
                            "type": "array"
                          }
                        }
                      },
                      "suspension": {
                        "type": "object",
                        "properties": {
                          "license_suspension_alert_days": {
                            "type": "integer"
                          },
                          "auto_suspension_mode": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "contracts": {
                    "type": "object",
                    "properties": {
                      "documents": {
                        "type": "object",
                        "properties": {
                          "sale_document_types": {
                            "type": "array"
                          },
                          "generate_as_draft": {
                            "type": "boolean"
                          },
                          "new_document_uses_associated_article": {
                            "type": "boolean"
                          },
                          "new_document_manpower_article": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "movements": {
                        "type": "object",
                        "properties": {
                          "stock_movement_type_in": {
                            "type": "string",
                            "nullable": true
                          },
                          "stock_movement_type_out": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "manpower": {
                        "type": "object",
                        "properties": {
                          "manpower_period": {
                            "type": "integer"
                          },
                          "manpower_minimum_quantity": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  },
                  "social": {
                    "type": "object",
                    "properties": {
                      "contributions": {
                        "type": "object",
                        "properties": {
                          "family_contribution_table": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "marketplaces": {
                    "type": "object",
                    "properties": {
                      "standvirtual_credentials": {
                        "type": "object",
                        "properties": {
                          "username": {
                            "type": "string",
                            "nullable": true
                          },
                          "password": {
                            "type": "string",
                            "nullable": true
                          },
                          "secret_key": {
                            "type": "string",
                            "nullable": true
                          },
                          "client_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "user_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "contact_person": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "standvirtual_publishing": {
                        "type": "object",
                        "properties": {
                          "send_price_by_default": {
                            "type": "boolean"
                          },
                          "allow_send_by_default": {
                            "type": "boolean"
                          },
                          "under_budget_by_default": {
                            "type": "boolean"
                          },
                          "allow_vehicles_in_park": {
                            "type": "boolean"
                          },
                          "only_vehicles_with_image": {
                            "type": "boolean"
                          }
                        }
                      },
                      "standvirtual_parts": {
                        "type": "object",
                        "properties": {
                          "parts_title_template": {
                            "type": "string",
                            "nullable": true
                          },
                          "parts_description_template": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "ai": {
                    "type": "object",
                    "properties": {
                      "assistant": {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "endpoint": {
                            "type": "string",
                            "nullable": true
                          },
                          "model": {
                            "type": "string",
                            "nullable": true
                          },
                          "role": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructions": {
                            "type": "string",
                            "nullable": true
                          },
                          "api_key": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "payments": {
                    "type": "object",
                    "properties": {
                      "multibanco_reference": {
                        "type": "object",
                        "properties": {
                          "active": {
                            "type": "boolean"
                          },
                          "provider": {
                            "type": "string",
                            "nullable": true
                          },
                          "payment_method": {
                            "type": "string",
                            "nullable": true
                          },
                          "receipt_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "document_types": {
                            "type": "array"
                          },
                          "series": {
                            "type": "string",
                            "nullable": true
                          },
                          "employee": {
                            "type": "string",
                            "nullable": true
                          },
                          "send_email": {
                            "type": "boolean"
                          },
                          "active_for_default_customer": {
                            "type": "boolean"
                          },
                          "account": {
                            "type": "string",
                            "nullable": true
                          },
                          "bank": {
                            "type": "string",
                            "nullable": true
                          },
                          "ifthenpay_entity": {
                            "type": "string",
                            "nullable": true
                          },
                          "ifthenpay_subentity": {
                            "type": "string",
                            "nullable": true
                          },
                          "ifthenpay_callback_key": {
                            "type": "string",
                            "nullable": true
                          },
                          "easypay_entity": {
                            "type": "string",
                            "nullable": true
                          },
                          "easypay_user_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "easypay_cin": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "mbway": {
                        "type": "object",
                        "properties": {
                          "active": {
                            "type": "boolean"
                          },
                          "merchant_pos_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "account": {
                            "type": "string",
                            "nullable": true
                          },
                          "bank": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "sepa": {
                        "type": "object",
                        "properties": {
                          "payment_method": {
                            "type": "string",
                            "nullable": true
                          },
                          "receipt_employee": {
                            "type": "string",
                            "nullable": true
                          },
                          "send_email": {
                            "type": "boolean"
                          },
                          "report_recipients": {
                            "type": "array"
                          }
                        }
                      }
                    }
                  },
                  "integrations": {
                    "type": "object",
                    "properties": {
                      "digital_signature": {
                        "type": "object",
                        "properties": {
                          "supplier": {
                            "type": "string",
                            "nullable": true
                          },
                          "digitalsign_user": {
                            "type": "string",
                            "nullable": true
                          },
                          "digitalsign_password": {
                            "type": "string",
                            "nullable": true
                          },
                          "digitalsign_authorizer_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "digitalsign_authorizer_secret": {
                            "type": "string",
                            "nullable": true
                          },
                          "digitalsign_reason": {
                            "type": "string",
                            "nullable": true
                          },
                          "digitalsign_country": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "shopify": {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "string",
                            "nullable": true
                          },
                          "domain": {
                            "type": "string",
                            "nullable": true
                          },
                          "api_version": {
                            "type": "string",
                            "nullable": true
                          },
                          "shipping_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "api_key": {
                            "type": "string",
                            "nullable": true
                          },
                          "password": {
                            "type": "string",
                            "nullable": true
                          },
                          "shared_secret": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "prestashop": {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string",
                            "nullable": true
                          },
                          "api_key": {
                            "type": "string",
                            "nullable": true
                          },
                          "shipping_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "create_customer": {
                            "type": "boolean"
                          },
                          "create_address": {
                            "type": "boolean"
                          }
                        }
                      },
                      "gtmotive": {
                        "type": "object",
                        "properties": {
                          "customer_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "workshop_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "user_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "workshop_password": {
                            "type": "string",
                            "nullable": true
                          },
                          "parts_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "manpower_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "paint_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "paint_manpower_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "maintenance_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "vat_code": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "tecdoc": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "nullable": true
                          },
                          "user": {
                            "type": "string",
                            "nullable": true
                          },
                          "ftp_server": {
                            "type": "string",
                            "nullable": true
                          },
                          "ftp_username": {
                            "type": "string",
                            "nullable": true
                          },
                          "ftp_password": {
                            "type": "string",
                            "nullable": true
                          },
                          "ftp_directory": {
                            "type": "string",
                            "nullable": true
                          },
                          "ftp_send_interval_hours": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "euronics": {
                        "type": "object",
                        "properties": {
                          "login": {
                            "type": "string",
                            "nullable": true
                          },
                          "password": {
                            "type": "string",
                            "nullable": true
                          },
                          "series_b2b": {
                            "type": "string",
                            "nullable": true
                          },
                          "series_b2c": {
                            "type": "string",
                            "nullable": true
                          },
                          "loyalty_card_url": {
                            "type": "string",
                            "nullable": true
                          },
                          "loyalty_card_store": {
                            "type": "string",
                            "nullable": true
                          },
                          "loyalty_card_login": {
                            "type": "string",
                            "nullable": true
                          },
                          "loyalty_card_password": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "hub4data": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true,
                            "format": "email"
                          },
                          "password": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "edi": {
                        "type": "object",
                        "properties": {
                          "automatic_send": {
                            "type": "boolean"
                          },
                          "document_types_to_communicate": {
                            "type": "array"
                          },
                          "send_interval": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "every_10_minutes",
                              "every_15_minutes",
                              "every_30_minutes",
                              "every_hour",
                              "every_2_hours"
                            ]
                          }
                        }
                      },
                      "egar": {
                        "type": "object",
                        "properties": {
                          "apa_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "profile_type": {
                            "type": "string",
                            "nullable": true
                          },
                          "certification_token": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "sms": {
                        "type": "object",
                        "properties": {
                          "supplier": {
                            "type": "string",
                            "nullable": true
                          },
                          "sender": {
                            "type": "string",
                            "nullable": true
                          },
                          "username": {
                            "type": "string",
                            "nullable": true
                          },
                          "hash": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "sjp": {
                        "type": "object",
                        "properties": {
                          "supplier": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "bcsdiesel": {
                        "type": "object",
                        "properties": {
                          "hull_family": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "call_center": {
                        "type": "object",
                        "properties": {
                          "call_cost": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  },
                  "hotel": {
                    "type": "object",
                    "properties": {
                      "billing": {
                        "type": "object",
                        "properties": {
                          "accommodation_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "accommodation_vat": {
                            "type": "string",
                            "nullable": true
                          },
                          "deposit_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "deposit_vat": {
                            "type": "string",
                            "nullable": true
                          },
                          "meal_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "meal_vat": {
                            "type": "string",
                            "nullable": true
                          },
                          "breakfast_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "lunch_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "dinner_article": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "stays": {
                        "type": "object",
                        "properties": {
                          "check_in_status": {
                            "type": "string",
                            "nullable": true
                          },
                          "check_out_status": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_bed_management": {
                            "type": "boolean"
                          }
                        }
                      },
                      "sef": {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "tax_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "property_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "contact": {
                            "type": "string",
                            "nullable": true
                          },
                          "email": {
                            "type": "string",
                            "nullable": true,
                            "format": "email"
                          },
                          "password": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "myallocator": {
                        "type": "object",
                        "properties": {
                          "user_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "password": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "retail": {
                    "type": "object",
                    "properties": {
                      "pos": {
                        "type": "object",
                        "properties": {
                          "uses_employee_management": {
                            "type": "boolean"
                          },
                          "asks_for_employee": {
                            "type": "boolean"
                          },
                          "uses_tables": {
                            "type": "boolean"
                          },
                          "shows_change_panel": {
                            "type": "boolean"
                          },
                          "uses_printer": {
                            "type": "boolean"
                          },
                          "menu_url": {
                            "type": "string",
                            "nullable": true
                          },
                          "uses_customer_display": {
                            "type": "boolean"
                          },
                          "shows_articles_on_display": {
                            "type": "boolean"
                          },
                          "prints_accounting_receipt": {
                            "type": "boolean"
                          }
                        }
                      },
                      "retail": {
                        "type": "object",
                        "properties": {
                          "asks_for_employee": {
                            "type": "boolean"
                          },
                          "uses_on_screen_keyboard": {
                            "type": "boolean"
                          },
                          "shows_quick_article": {
                            "type": "boolean"
                          },
                          "shows_change_panel": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  },
                  "pwm": {
                    "type": "object",
                    "properties": {
                      "schedule": {
                        "type": "object",
                        "properties": {
                          "day_start_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "day_end_time": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "processes": {
                        "type": "object",
                        "properties": {
                          "process_mask": {
                            "type": "string",
                            "nullable": true
                          },
                          "import_sheet_number": {
                            "type": "string",
                            "nullable": true
                          },
                          "import_start_line": {
                            "type": "integer"
                          },
                          "article_auto_measurement": {
                            "type": "string",
                            "nullable": true
                          },
                          "equipment_date_overlap_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "employee_date_overlap_mode": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "disabled",
                              "warn",
                              "block"
                            ]
                          },
                          "creates_cost_center": {
                            "type": "boolean"
                          }
                        }
                      },
                      "closing": {
                        "type": "object",
                        "properties": {
                          "raw_material_documents": {
                            "type": "array"
                          },
                          "other_cost_documents": {
                            "type": "array"
                          }
                        }
                      },
                      "types": {
                        "type": "object",
                        "properties": {
                          "article_types": {
                            "type": "string",
                            "nullable": true
                          },
                          "equipment_types": {
                            "type": "string",
                            "nullable": true
                          },
                          "manpower_service_types": {
                            "type": "string",
                            "nullable": true
                          },
                          "task_types": {
                            "type": "string",
                            "nullable": true
                          },
                          "other_types": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "mms": {
                    "type": "object",
                    "properties": {
                      "defaults": {
                        "type": "object",
                        "properties": {
                          "manpower_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "normal_priority": {
                            "type": "string",
                            "nullable": true
                          },
                          "panel_future_days": {
                            "type": "integer"
                          }
                        }
                      },
                      "numbering": {
                        "type": "object",
                        "properties": {
                          "work_order_format": {
                            "type": "string",
                            "nullable": true
                          },
                          "equipment_code_format": {
                            "type": "string",
                            "nullable": true
                          },
                          "location_code_format": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "states": {
                        "type": "object",
                        "properties": {
                          "work_created": {
                            "type": "string",
                            "nullable": true
                          },
                          "damages_created": {
                            "type": "string",
                            "nullable": true
                          },
                          "work_listed": {
                            "type": "string",
                            "nullable": true
                          },
                          "work_in_progress": {
                            "type": "string",
                            "nullable": true
                          },
                          "work_paused": {
                            "type": "string",
                            "nullable": true
                          },
                          "work_done": {
                            "type": "string",
                            "nullable": true
                          },
                          "work_closed": {
                            "type": "string",
                            "nullable": true
                          },
                          "work_canceled": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "verticals": {
                    "type": "object",
                    "properties": {
                      "rentacar": {
                        "type": "object",
                        "properties": {
                          "delivery_checklist": {
                            "type": "string",
                            "nullable": true
                          },
                          "pickup_checklist": {
                            "type": "string",
                            "nullable": true
                          },
                          "contract_label": {
                            "type": "string",
                            "nullable": true
                          },
                          "rental_conditions": {
                            "type": "string",
                            "nullable": true
                          },
                          "contract_header_first_page": {
                            "type": "string",
                            "nullable": true
                          },
                          "contract_header_other_pages": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "loyalty": {
                        "type": "object",
                        "properties": {
                          "points_conversion": {
                            "type": "integer"
                          },
                          "discount_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "default_points_yes": {
                            "type": "integer"
                          },
                          "default_points_no": {
                            "type": "integer"
                          },
                          "default_discount_yes": {
                            "type": "integer"
                          },
                          "default_discount_no": {
                            "type": "integer"
                          },
                          "card_letter_text": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "condominiums": {
                        "type": "object",
                        "properties": {
                          "article": {
                            "type": "string",
                            "nullable": true
                          },
                          "paid_item": {
                            "type": "string",
                            "nullable": true
                          },
                          "common_fund_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "common_fund_paid_item": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "external_saft": {
                        "type": "object",
                        "properties": {
                          "generic_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "generic_service_article": {
                            "type": "string",
                            "nullable": true
                          },
                          "payment_method": {
                            "type": "string",
                            "nullable": true
                          },
                          "cash_register": {
                            "type": "string",
                            "nullable": true
                          },
                          "bank_account": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  },
                  "banks": {
                    "type": "object",
                    "properties": {
                      "defaults": {
                        "type": "object",
                        "properties": {
                          "default_bank": {
                            "type": "string",
                            "nullable": true
                          },
                          "default_bank_account": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "operations": {
                        "type": "object",
                        "properties": {
                          "card_payments_on_pos_terminal": {
                            "type": "boolean"
                          },
                          "required_cash_movement_fields": {
                            "type": "array"
                          },
                          "required_bank_operation_fields": {
                            "type": "array"
                          }
                        }
                      },
                      "interface": {
                        "type": "object",
                        "properties": {
                          "bank_account_label_format": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                              "account_type",
                              "account_description"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Module name to its topics.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Topic name to its parameters.",
                        "additionalProperties": {
                          "type": "object",
                          "description": "Parameter name to its value.",
                          "additionalProperties": {
                            "nullable": true,
                            "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "integer"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "integer"
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": true
                              }
                            ]
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/documents": {
      "get": {
        "summary": "List purchase documents",
        "description": "Returns purchase documents with optional filtering by period, supplier, document type and accounting flags.\n        Ordered by the requested sort (date descending by default), with ties broken by document type and number.\n        A period without documents is an empty page.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewDocuments",
          "privileges": [
            "relatorios:compras",
            "relatorios:compras:geraldocs"
          ],
          "notes": "Requires both Purchases Reports and General Documents privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field alias. Prefix with - for descending; without it the direction comes from sorder. Allowed: serie, employee_code, vendor_code, supplier_id, supplier_tax_id, date, document_number, canceled, updated_stocks, updated_current_account, debit, credit.",
            "example": "-date",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction when using order without prefix. Defaults to ASC.",
            "example": "DESC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "from_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[debit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[credit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[from_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter object. start_date / end_date: date range (Y-m-d); with no start_date, end_date or date, the current month up to today. serie, employee_code, vendor_code, supplier_id, supplier_tax_id, document_number, plate, date (Y-m-d): exact match, or filter[field][operator] (eq, neq, gt, gte, lt, lte, like, nlike, sw, ew, in, nin; in and nin take a list or comma-separated values). from_supplier, to_supplier: supplier range, also with an operator. canceled, updated_stocks, updated_current_account, debit, credit: T or F, also with an operator. document_types, suppliers, general_type: arrays for IN filter, or filter[field][operator]; more than 50 values returns 422.",
            "example": {
              "start_date": "2026-01-01",
              "end_date": "2026-01-31",
              "document_types": [
                "AFT"
              ],
              "suppliers": [
                "80000002"
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PurchaseDocumentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/documents/groups": {
      "get": {
        "summary": "Totals of purchase documents per group",
        "description": "Groups the purchase documents by group_by (supplier, employee, document, series or\n        supplier_classification) and returns the net value, VAT and total of each group, as the summary\n        print of the \"Geral Documentos\" report does: cancelled documents are left out and receipts count only\n        in the total. Takes the same filters as documents. Groups come in the order of the summary print\n        (supplier by total, employee by name, document and series by code), ties broken by code and name, and\n        the page is cut after the totals are computed. A period without documents is an empty page.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewDocuments",
          "privileges": [
            "relatorios:compras",
            "relatorios:compras:geraldocs"
          ],
          "notes": "Requires both Purchases Reports and General Documents privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "from_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "group_by",
            "in": "query",
            "required": true,
            "description": "Field the documents are grouped by: supplier, employee, document, series, supplier_classification.",
            "example": "supplier",
            "schema": {
              "type": "string",
              "enum": [
                "supplier",
                "employee",
                "document",
                "series",
                "supplier_classification"
              ]
            }
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[debit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[credit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[from_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Same filters as documents. With no start_date, end_date or date, the current month up to today.",
            "example": {
              "start_date": "2026-01-01",
              "end_date": "2026-01-31",
              "document_types": [
                "FAF",
                "NCF"
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PurchaseDocumentGroupOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/articles-by-document": {
      "get": {
        "summary": "List articles by purchase document",
        "description": "Returns article-level purchase report data grouped by source documents, ordered by the requested sort, then\n        by state and date, with ties broken by document type, number and line. A period without lines is an\n        empty page.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewArticlesByDocument",
          "privileges": [
            "relatorios:compras",
            "relatorios:compras:artigospordocumento"
          ],
          "notes": "Requires both Purchases Reports and Articles by Document privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field, applied before the default order (state, date). Prefix with - for descending; without it the direction comes from sorder. Any other value returns 422.",
            "example": "-date",
            "schema": {
              "type": "string",
              "enum": [
                "general_type",
                "serie",
                "employee_code",
                "vendor_code",
                "supplier_id",
                "supplier_tax_id",
                "date",
                "document_number",
                "canceled",
                "updated_stocks",
                "updated_current_account",
                "debit",
                "credit",
                "plate",
                "line_number",
                "article_id",
                "document_type",
                "number",
                "-general_type",
                "-serie",
                "-employee_code",
                "-vendor_code",
                "-supplier_id",
                "-supplier_tax_id",
                "-date",
                "-document_number",
                "-canceled",
                "-updated_stocks",
                "-updated_current_account",
                "-debit",
                "-credit",
                "-plate",
                "-line_number",
                "-article_id",
                "-document_type",
                "-number"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction when using order without prefix. Defaults to ASC.",
            "example": "ASC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field, applied before the default order (state, date). Prefix with - for descending. Takes precedence over order. Any other value returns 422.",
            "example": "-date",
            "schema": {
              "type": "string",
              "enum": [
                "general_type",
                "serie",
                "employee_code",
                "vendor_code",
                "supplier_id",
                "supplier_tax_id",
                "date",
                "document_number",
                "canceled",
                "updated_stocks",
                "updated_current_account",
                "debit",
                "credit",
                "plate",
                "line_number",
                "article_id",
                "document_type",
                "number",
                "-general_type",
                "-serie",
                "-employee_code",
                "-vendor_code",
                "-supplier_id",
                "-supplier_tax_id",
                "-date",
                "-document_number",
                "-canceled",
                "-updated_stocks",
                "-updated_current_account",
                "-debit",
                "-credit",
                "-plate",
                "-line_number",
                "-article_id",
                "-document_type",
                "-number"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "line_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "from_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[line_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[line_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[debit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[credit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[from_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter object. start_date / end_date: date range (Y-m-d). serie, employee_code, vendor_code, supplier_id, supplier_tax_id, document_number, line_number, plate: exact match, or filter[field][operator] (eq, neq, gt, gte, lt, lte, like, nlike, sw, ew, in, nin; in and nin take a list or comma-separated values). canceled, updated_stocks, updated_current_account, debit, credit: T or F, also with an operator. document_types, suppliers, articles, families, general_type: arrays for IN filter, or filter[field][operator] with in, nin, eq or neq; any other operator returns 422.",
            "example": {
              "start_date": "2026-01-01",
              "end_date": "2026-01-31",
              "canceled": "F",
              "document_types": [
                "AFT",
                "AFR"
              ],
              "articles": [
                "A"
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PurchaseArticleByDocumentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/articles-by-document/groups": {
      "get": {
        "summary": "Totals of articles by purchase document per group",
        "description": "Groups the lines of articles-by-document by group_by (store, serie, state, family, supplier, brand,\n        opportunity, activity_sector, article or cost_center) and returns the quantity, net value, VAT and\n        total of each group, as the resumed print of the \"Artigos por documento\" report does. Takes the same\n        filters as articles-by-document. Groups come in the order of their first line in articles-by-document\n        and the page is cut after the totals are computed. A period without lines is an empty page.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewArticlesByDocument",
          "privileges": [
            "relatorios:compras",
            "relatorios:compras:artigospordocumento"
          ],
          "notes": "Requires both Purchases Reports and Articles by Document privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "supplier_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "line_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "from_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_supplier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "group_by",
            "in": "query",
            "required": true,
            "description": "Field the lines are grouped by: store, serie, state, family, supplier, brand, opportunity, activity_sector, article, cost_center.",
            "example": "supplier",
            "schema": {
              "type": "string",
              "enum": [
                "store",
                "serie",
                "state",
                "family",
                "supplier",
                "brand",
                "opportunity",
                "activity_sector",
                "article",
                "cost_center"
              ]
            }
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[supplier_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[line_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[line_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[debit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[credit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[from_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_supplier][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_supplier][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Same filters as articles-by-document. With no start_date and end_date, the current month up to today.",
            "example": {
              "start_date": "2026-01-01",
              "end_date": "2026-01-31",
              "document_types": [
                "AFT",
                "AFR"
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PurchaseArticlesByDocumentGroupOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/purchases-by-billing-series": {
      "get": {
        "summary": "Purchases by billing series",
        "description": "Returns net purchases (credit notes subtracted) grouped by billing series for the requested window,\n        bucketed by month. The window is inclusive on both ends and defaults to the last 12 months including the\n        current one. Months without purchases are returned as zero so the arrays stay index-aligned with the dates\n        array; an empty window is a 200 with zeros, never a 404.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewPurchasesByBillingSeries",
          "privileges": [
            "relatorios:estadisticas:compras"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = relatorios:estadisticas:compras). Single ability for the endpoint, no per-parameter selection."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day of the window (inclusive). Defaults to the first day of the month 11 months back, giving 12 monthly buckets including the current month. Applied literally: the window is not expanded to whole calendar months, so a partial month at either end only sums the days inside the requested range.",
            "example": "2025-09-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day of the window (inclusive). Defaults to today.",
            "example": "2026-08-25",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchasesByBillingSeriesOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/top-creditors": {
      "get": {
        "summary": "List the suppliers we owe the most",
        "description": "Returns the suppliers whose current account balance is still owed, aggregated per supplier\n        (sum of credits minus sum of debits) and truncated to limit (default 25, max 100). Mirrors the legacy\n        dashboard widget (dashboard.id = 83): only balances above 0.01 are reported, so every row is a real debt\n        to the supplier. Unlike the sales top-debtors report there is no litigious filter, because suppliers have\n        no such flag. Suppliers present in the current account but missing from the supplier table are still\n        returned, with supplier_name and supplier_tax_id null. Ordered by balance descending by default and\n        sortable by balance, supplier_name or supplier_id through order/sorder; ties are broken by supplier_id\n        ascending so the order is stable across calls.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewTopCreditors",
          "privileges": [
            "compras"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.id = 83 has privilege = compras, not compras:fa). The route additionally carries og-module:COMPRAS, matching dashboard.module = COMPRAS and the OGMF catalog gate."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of creditors to return (1-100). Defaults to 25.",
            "example": 25,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field. Allowed: balance, supplier_name, supplier_id. Defaults to balance.",
            "example": "balance",
            "schema": {
              "type": "string",
              "enum": [
                "balance",
                "supplier_name",
                "supplier_id"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC). Defaults to DESC.",
            "example": "DESC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopCreditorOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/supplier-invoices-due": {
      "get": {
        "summary": "List supplier invoices still to be settled",
        "description": "Returns the supplier invoices whose paid amount is still below their total, ordered by due date ascending\n        and truncated to limit (default 25, max 100). Mirrors the legacy dashboard widget (dashboard.id = 5): only\n        credit, stock and account-updating purchase documents count. Unlike the customer invoices due report there\n        is no litigious filter and no billing-series access gate, because the legacy widget never had either.\n        Sortable by due_date, date or total through order/sorder. A document with no due date reports due_date as\n        null.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewSupplierInvoicesDue",
          "privileges": [
            "compras:faf"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.id = 5, dashboard.privilege = compras:faf, bare). The route additionally carries og-module:COMPRAS, matching dashboard.module = COMPRAS."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of invoices to return (1-100). Defaults to 25.",
            "example": 25,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field. Allowed: due_date, date, total. Defaults to due_date.",
            "example": "due_date",
            "schema": {
              "type": "string",
              "enum": [
                "due_date",
                "date",
                "total"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC). Defaults to ASC.",
            "example": "ASC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SupplierInvoiceDueOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/reports/purchases-summary": {
      "get": {
        "summary": "Get the purchases summary",
        "description": "Returns the four rows of the purchases summary dashboard widget over three windows: the current month, the\n        previous month, the monthly average of the year so far and the current-year total. Takes no parameters —\n        the windows are anchored to the server clock, as the legacy widget it replaces is. rows always holds\n        exactly four entries in this order: purchases (invoiced amount, aggregated per document), then goods,\n        services and accounting (aggregated per document line and filtered by article type N, S and O). Only\n        cancelled-free, account-updating, non-receipt purchase documents are counted; a document that only debits,\n        and any credit note by SAFT type, subtracts. IMPORTANT: goods, services and accounting do NOT add up to\n        purchases, and that is part of the contract, not a defect — article types outside N, S and O exist in the\n        data and belong to none of the three rows. A money value of null means there were no documents in that\n        window at all, while 0 means there were documents and they sum to zero — the two are different and the\n        distinction is part of the contract. Each row carries one series entry per billing series with movement in\n        any of the windows, ordered by series code, with the documents that carry no billing series first as a\n        single entry whose serie and name are both null.",
        "tags": [
          "Purchases",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Reports\\Policies\\PurchasesReportsPolicy",
          "ability": "viewPurchasesSummary",
          "privileges": [
            "compras"
          ],
          "notes": "Mirrors the legacy dashboard widget gate for dashboard.id = 61 AFTER card 2049 corrects it: the row was catalogued as module VENDAS / privilege vendas, which the card flags as wrong for a purchases widget. Bare compras follows widget 83 (top_creditors), the other whole-company purchases widget that is not a statistics report. The route additionally carries og-module:COMPRAS, matching the corrected dashboard.module."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchasesSummaryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/documents": {
      "get": {
        "summary": "List sales documents",
        "description": "Returns sales documents with optional filtering by period, customer, document type and integration/accounting flags. Default period is\n        current month when no date range is provided. Ordered by the requested sort (date descending by default), with ties broken by document\n        type and number. A period without documents is an empty page.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewDocuments",
          "privileges": [
            "relatorios:vendas",
            "relatorios:vendas:geraldocs"
          ],
          "notes": "Requires both Sales Reports and General Documents privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field alias. Allowed aliases: serie, employee_code, vendor_code, customer_id, customer_tax_id, date, document_number, canceled, updated_stocks, updated_current_account, debit, credit, integrated.",
            "example": "date",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction.",
            "example": "DESC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "integrated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "due_date_lt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "customer_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "from_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[debit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[credit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[integrated][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[integrated][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[due_date_lt][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[due_date_lt][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[customer_name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[from_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Deep object filter. Supported keys: serie, employee_code, vendor_code, customer_id, customer_tax_id, from_customer, to_customer, start_date, end_date, due_date_lt, customer_name, document_number, canceled, updated_stocks, updated_current_account, debit, credit, document_types, customers, integrated.",
            "example": {
              "start_date": "2026-02-01",
              "end_date": "2026-02-19",
              "document_types": [
                "FT"
              ],
              "customers": [
                "C0001"
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SalesDocumentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/articles-by-document": {
      "get": {
        "summary": "List articles by document",
        "description": "Returns article-level sales report data grouped by source documents, with optional WMS line enrichment and optional signature metadata\n        depending on signature_flag. Ordered by the requested sort, with ties broken by date, document type, number and line. A period without\n        lines is an empty page.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewArticlesByDocument",
          "privileges": [
            "relatorios:vendas",
            "relatorios:vendas:artigospordocumento"
          ],
          "notes": "Requires both Sales Reports and Articles by Document privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field, applied before the default order (date). Prefix with - for descending; without it the direction comes from sorder. Any other value returns 422.",
            "example": "-date",
            "schema": {
              "type": "string",
              "enum": [
                "type_saft",
                "serie",
                "employee_code",
                "vendor_code",
                "customer_id",
                "customer_tax_id",
                "date",
                "document_number",
                "canceled",
                "updated_stocks",
                "updated_current_account",
                "debit",
                "credit",
                "plate",
                "line_number",
                "-type_saft",
                "-serie",
                "-employee_code",
                "-vendor_code",
                "-customer_id",
                "-customer_tax_id",
                "-date",
                "-document_number",
                "-canceled",
                "-updated_stocks",
                "-updated_current_account",
                "-debit",
                "-credit",
                "-plate",
                "-line_number"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction when using order without prefix. Defaults to ASC.",
            "example": "ASC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field, applied before the default order (date). Prefix with - for descending. Takes precedence over order. Any other value returns 422.",
            "example": "-date",
            "schema": {
              "type": "string",
              "enum": [
                "type_saft",
                "serie",
                "employee_code",
                "vendor_code",
                "customer_id",
                "customer_tax_id",
                "date",
                "document_number",
                "canceled",
                "updated_stocks",
                "updated_current_account",
                "debit",
                "credit",
                "plate",
                "line_number",
                "-type_saft",
                "-serie",
                "-employee_code",
                "-vendor_code",
                "-customer_id",
                "-customer_tax_id",
                "-date",
                "-document_number",
                "-canceled",
                "-updated_stocks",
                "-updated_current_account",
                "-debit",
                "-credit",
                "-plate",
                "-line_number"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "line_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "Start of the date range on document date (Y-m-d). When no date is sent, the range is the current month up to today.",
            "example": "2026-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "End of the date range on document date (Y-m-d).",
            "example": "2026-01-31",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "wmso_lines_flag",
            "in": "query",
            "required": false,
            "description": "Document type code (e.g. FT) used to resolve the wmso lines table. When provided, each item includes wmso_lines.",
            "example": "FT",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature_flag",
            "in": "query",
            "required": false,
            "description": "Document type code used to resolve the signature metadata join. When provided, each item includes signature_by and signature_date.",
            "example": "FT",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[line_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[line_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[debit][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[credit][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[from_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter object. type_saft: SAFT document type code (e.g. FT, NC, ND). serie: document series code. employee_code: employee code. vendor_code: vendor/salesperson code. customer_id: customer code (exact match). from_customer / to_customer: customer code range. customer_tax_id: customer tax ID. document_number: document reference number. line_number: line number within document. plate: vehicle plate. canceled: T or F. updated_stocks / updated_current_account / debit / credit: T or F. document_types: array of document type codes (codabreviado). customers: array of customer codes. articles: array of article codes. families: array of article family codes.",
            "example": {
              "type_saft": "FT",
              "canceled": "F",
              "document_types": [
                "FT",
                "FR"
              ],
              "articles": [
                "A001",
                "A002"
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SalesArticleByDocumentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/articles-by-document/groups": {
      "get": {
        "summary": "Totals of articles by sales document per group",
        "description": "Groups the lines of articles-by-document by group_by (store, serie, state, family, customer, brand,\n        salesperson, opportunity, activity_sector, article or cost_center) and returns the quantity, net value,\n        VAT and total of each group, ordered by the date of its first line and then by name. Groups are labelled\n        as in the resumed print of the \"Artigos por documento\" report, but the totals are those of the\n        articles-by-document lines for the same filters, not of the print: canceled documents count unless filter\n        canceled is false, and lines without store count too, in the groups named \" - \" (no store code) and\n        \"0 - \" (store code 0) when grouping by store. The page is cut after the totals are computed. A period\n        without lines is an empty page.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewArticlesByDocument",
          "privileges": [
            "relatorios:vendas",
            "relatorios:vendas:artigospordocumento"
          ],
          "notes": "Requires both Sales Reports and Articles by Document privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "line_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "from_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "group_by",
            "in": "query",
            "required": true,
            "description": "Field the lines are grouped by: store, serie, state, family, customer, brand, salesperson, opportunity, activity_sector, article, cost_center. cost_center requires the CONTABILIDADE module.",
            "example": "customer",
            "schema": {
              "type": "string",
              "enum": [
                "store",
                "serie",
                "state",
                "family",
                "customer",
                "brand",
                "salesperson",
                "opportunity",
                "activity_sector",
                "article",
                "cost_center"
              ]
            }
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[line_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[line_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[debit][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq. Example: filter[credit][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[from_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Same filters as articles-by-document. With no start_date and end_date, the current month up to today.",
            "example": {
              "start_date": "2026-01-01",
              "end_date": "2026-01-31",
              "document_types": [
                "FT",
                "NC"
              ]
            },
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SalesArticlesByDocumentGroupOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/sales-by-billing-series": {
      "get": {
        "summary": "Sales by billing series",
        "description": "Returns net sales (credit notes subtracted) grouped by billing series for the requested window, bucketed\n        by day or by month depending on granularity. The window is inclusive on both ends; with granularity=day it\n        defaults to the last 30 days, with granularity=month to the last 12 months. Buckets without sales are\n        returned as zero so the arrays stay index-aligned with the dates array.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewSalesByBillingSeries",
          "privileges": [
            "vendas"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas). Single ability for the unified endpoint, regardless of granularity."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "nullable": true
            }
          },
          {
            "name": "serie",
            "in": "query",
            "required": false,
            "description": "Restrict the report to a single billing series.",
            "example": "666",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_tax_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_stocks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "updated_current_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            },
            "deprecated": true
          },
          {
            "name": "integrated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day of the window (inclusive). Defaults to end_date minus 29 days when granularity=day, or to the first day of the month 11 months back when granularity=month.",
            "example": "2026-07-14",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day of the window (inclusive). Defaults to today.",
            "example": "2026-08-12",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "due_date_lt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "customer_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "from_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "to_customer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Aggregation bucket: day or month. Defaults to day. When month, start_date/end_date are applied literally (not expanded to full calendar months) and default to the last 12 months (including the current one) when omitted.",
            "example": "month",
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "month"
              ]
            }
          },
          {
            "name": "filter[serie][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[serie][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[employee_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[employee_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[canceled][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[canceled][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_stocks][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_stocks][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[updated_current_account][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_current_account][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[debit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[credit][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[integrated][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[integrated][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[due_date_lt][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[due_date_lt][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[customer_name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[from_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[from_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[to_customer][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[to_customer][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Deep object form of the same fields, always with an operator (filter[start_date][gte]=...); the scalar form filter[start_date]=... is rejected with 422. For start_date and end_date the operator is required syntax but is not honoured: only the value is read, and it is always applied as the lower bound for start_date and the upper bound for end_date. Use gte for start_date and lte for end_date; any other operator is accepted and silently treated the same way. Being DocumentSchema-backed, the remaining document filters (employee_code, vendor_code, customer_id, customer_tax_id, document_number, canceled, integrated, ...) are also accepted and narrow the aggregation.",
            "example": {
              "start_date": {
                "gte": "2026-07-14"
              },
              "end_date": {
                "lte": "2026-08-12"
              }
            },
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesByBillingSeriesOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/sales": {
      "get": {
        "summary": "Get daily sales for a rolling or explicit window",
        "description": "Returns the net sales total (VAT excluded) per day, mapped by date, between start_date and end_date (defaults to\n        the last 30 days ending today, max 90 days apart), zero-filled for days without sales. Filtered by employee_id\n        when provided; omit it to aggregate sales across every employee.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewDailySales",
          "privileges": [
            "vendas"
          ],
          "notes": "Requires the Sales widget privilege. Single ability for the unified endpoint, regardless of employee_id."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "CodEmpr of the employee to filter by. Omit to aggregate sales across every employee.",
            "example": 1,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "Window start date (Y-m-d). Defaults to 29 days before today when omitted.",
            "example": "2026-07-16",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Window end date (Y-m-d). Defaults to today when omitted.",
            "example": "2026-08-14",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DailySalesOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/daily-documents": {
      "get": {
        "summary": "List sales documents registered in a recent window",
        "description": "Returns the sales documents that update the current account and fall inside a window of the last days\n        counting back from today, matched on either the document date or its registration date. Canceled documents\n        are included and carry their state. Returns an empty list when the window has no documents.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewDailyDocuments",
          "privileges": [
            "vendas"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas) for the daily documents list."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Size of the window in days, counting back from today and including it (1-31). Defaults to 1.",
            "example": 7,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DailySalesDocumentOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/sales-by-article-family": {
      "get": {
        "summary": "Sales by article family",
        "description": "Returns the net sales total (VAT excluded, credit notes subtracted) aggregated by the root family of the sold\n        articles, ordered by total descending and truncated to limit (default 10). Covers the whole document history:\n        this endpoint has no date window, mirroring the legacy dashboard widget it replaces. Families with no row in\n        the families catalogue, and articles with no family, are excluded.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewSalesByArticleFamily",
          "privileges": [
            "vendas",
            "stocks"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas&stocks), where & means AND."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many families to return, ordered by net total descending. Defaults to 10 when omitted, mirroring the legacy dashboard widget.",
            "example": 10,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SalesByArticleFamilyOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/top-customers": {
      "get": {
        "summary": "Get top customers by net sales",
        "description": "Returns the customers with the highest net sales (credit notes subtracted, VAT excluded) for the requested\n        year, optionally narrowed to a single month. The number of customers is controlled by limit (defaults to 5,\n        max 25) and each row carries its share of the returned set as a percentage. Sortable by total or\n        customer_name through order/sorder.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewTopCustomers",
          "privileges": [
            "vendas"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas)."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Calendar year to aggregate. Defaults to the current year when omitted.",
            "example": 2026,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Month (1-12) to narrow the aggregation. Omit to aggregate the whole year.",
            "example": 8,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of customers to return (1-25). Defaults to 5.",
            "example": 5,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field. Allowed: total, customer_name. Defaults to total.",
            "example": "total",
            "schema": {
              "type": "string",
              "enum": [
                "total",
                "customer_name"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC). Defaults to DESC.",
            "example": "DESC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TopCustomersOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/top-selling-articles": {
      "get": {
        "summary": "Top selling articles",
        "description": "Returns the top selling articles ranked by net sales total (VAT excluded, credit notes subtracted)\n        across all non-canceled sales documents updated in the current account. Only normal articles are\n        considered. Results are ordered by total descending, limited by the limit parameter (default 15).",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewTopSellingArticles",
          "privileges": [
            "vendas",
            "stocks"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas&stocks). Requires both privileges."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of articles returned, ranked by net sales total. Defaults to 15, max 100.",
            "example": 15,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopSellingArticleOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/sales-by-year": {
      "get": {
        "summary": "Get net sales value per year",
        "description": "Returns the net sales value (VAT excluded, credit notes subtracted) aggregated by calendar year, ordered by\n        year ascending. Covers the whole document history: this endpoint has no date window, mirroring the legacy\n        dashboard widget it replaces. Only cancelled-free documents whose type is a recapitulative, account-updating,\n        non-receipt sales type are counted. Pass customer_id to narrow the aggregation to a single customer.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewSalesByYear",
          "privileges": [
            "vendas",
            "relatorios:estadisticas:vendasgerais"
          ],
          "notes": "Mirrors the seeded dashboard widget gate (dashboard.privilege = vendas&relatorios:estadisticas:vendasgerais), where & means AND."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Narrows the aggregation to a single customer. Omit to cover every customer.",
            "example": 1024,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SalesByYearOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/customer-invoices-due": {
      "get": {
        "summary": "List customer invoices still to be settled",
        "description": "Returns the customer invoices whose paid amount is still below their total, ordered by due date ascending\n        and truncated to limit (default 25, max 100). Mirrors the legacy dashboard widget: only debit, account-updating,\n        non-cancelled sales documents count, customers flagged as litigious are excluded, and the rows are restricted\n        to the billing series the authenticated employee has access to. Sortable by due_date, date or total through\n        order/sorder. A document with no due date reports due_date as null.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewCustomerInvoicesDue",
          "privileges": [
            "vendas:fa"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas:fa)."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of invoices to return (1-100). Defaults to 25.",
            "example": 25,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field. Allowed: due_date, date, total. Defaults to due_date.",
            "example": "due_date",
            "schema": {
              "type": "string",
              "enum": [
                "due_date",
                "date",
                "total"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC). Defaults to ASC.",
            "example": "ASC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerInvoiceDueOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/top-debtors": {
      "get": {
        "summary": "List the customers who owe the most",
        "description": "Returns the customers whose current account balance is still in debt, aggregated per customer\n        (sum of debits minus sum of credits) and truncated to limit (default 25, max 100). Mirrors the legacy\n        dashboard widget: customers flagged as litigious are excluded and only balances above 0.01 are reported,\n        so every row is a real debt. Ordered by balance descending by default, and sortable by balance,\n        customer_name or customer_id through order/sorder. Unlike the customer invoices due report, the rows are\n        not restricted by billing series, because the legacy query this replaces has no such gate.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewTopDebtors",
          "privileges": [
            "vendas:fa"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas:fa). Unlike viewCustomerInvoicesDue, the report is not additionally cut by billing series, because the legacy query it replaces has no SeriesAccesso gate."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of debtors to return (1-100). Defaults to 25.",
            "example": 25,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field. Allowed: balance, customer_name, customer_id. Defaults to balance.",
            "example": "balance",
            "schema": {
              "type": "string",
              "enum": [
                "balance",
                "customer_name",
                "customer_id"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC, DESC). Defaults to DESC.",
            "example": "DESC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopDebtorOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/profit": {
      "get": {
        "summary": "Get net sales total and profit for a window of calendar months",
        "description": "Returns the net sales total (VAT excluded) and the profit margin of the sales documents of a window of\n        whole calendar months, credit notes subtracted from both, as ONE aggregate pair and not a per-month series.\n        Two mutually exclusive ways to ask for the window: month/year for a single month (defaulting to the current\n        server month, the window the legacy widget 74 shows) or from_month/from_year/to_month/to_year for an\n        interval (each component defaults on its own: to is the current server month, from is three calendar months\n        before to, the window the legacy widget 75 shows). Combining the two forms is rejected with 422, as is a\n        from after to. The window actually queried is always echoed back in from_*/to_* so the consumer can title\n        the card without deriving it from its own clock, and month/year are echoed as well whenever the window\n        covers a single month. Only documents that update the current account, are not cancelled, are not receipts,\n        are not advance payments and carry at least one line are counted. Both totals can be zero (no documents in\n        the window) or negative (a window of credit notes only).",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewProfit",
          "privileges": [
            "vendas"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas). Single ability for the endpoint, regardless of the requested window."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Calendar year of a single-month window. Defaults to the current server year when omitted. Cannot be combined with from_*/to_*.",
            "example": 2026,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Month (1-12) of a single-month window. The whole calendar month is aggregated, from its first day at 00:00:00 to its last day at 23:59:59. Defaults to the current server month. Cannot be combined with from_*/to_*.",
            "example": 8,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "from_year",
            "in": "query",
            "required": false,
            "description": "Calendar year of the first month of the window (inclusive). Defaults to the year of the month three calendar months before to_month/to_year.",
            "example": 2026,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "from_month",
            "in": "query",
            "required": false,
            "description": "First month (1-12) of the window (inclusive). Defaults to three calendar months before to_month/to_year.",
            "example": 5,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to_year",
            "in": "query",
            "required": false,
            "description": "Calendar year of the last month of the window (inclusive). Defaults to the current server year.",
            "example": 2026,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to_month",
            "in": "query",
            "required": false,
            "description": "Last month (1-12) of the window (inclusive). Defaults to the current server month.",
            "example": 8,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProfitOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/profit-by-article-family": {
      "get": {
        "summary": "Get the profit of a calendar month per article family",
        "description": "Returns the profit margin of the sales lines of one whole calendar month, credit notes subtracted,\n        aggregated by the family of the article of each line, plus the window that was queried. month and year\n        default to the current server month and year, so a bare request is the window the legacy widget 76 shows.\n        Only lines of documents that update the current account, are not cancelled, are not receipts and are not\n        advance payments are counted, and the placeholder article \".\" is excluded. Lines whose article is missing\n        from the catalogue, has no family or has an empty family code all collapse into a single row with a null\n        family_code. profit can be negative (a family with credit notes only) and can be 0 (a family whose lines\n        cancel out), but a family whose lines all carry zero margin has no row at all. Rows come in first-seen\n        order, by document date ascending, and families is empty when the month has no line carrying margin.\n        This total does NOT reconcile with the profit endpoint by contract: that one aggregates the margin of the\n        DOCUMENT and counts documents whose only line is the placeholder article, this one aggregates the margin\n        of the LINES and does not.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewProfitByArticleFamily",
          "privileges": [
            "vendas"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas). Bare vendas, unlike viewSalesByArticleFamily, which mirrors a vendas&stocks widget."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Calendar year of the window. Defaults to the current server year when omitted.",
            "example": 2026,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Month (1-12) of the window. The whole calendar month is aggregated, from its first day at 00:00:00 to its last day at 23:59:59. Defaults to the current server month.",
            "example": 8,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The queried window and one row per article family with profit margin in it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "month": {
                          "type": "integer",
                          "description": "Month (1-12) actually queried, with the default already resolved from the server clock."
                        },
                        "year": {
                          "type": "integer",
                          "description": "Year actually queried, with the default already resolved from the server clock."
                        },
                        "families": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "family_code": {
                                "type": "string",
                                "nullable": true,
                                "description": "Raw article family code (artigos.codfam). Null is the no-family bucket: lines whose article is missing from the catalogue, has no family, or has an empty family code. At most one row carries it."
                              },
                              "family_name": {
                                "type": "string",
                                "nullable": true,
                                "description": "Family designation (familias.designacao), never translated. Null when the family code has no row in the families catalogue, and on the no-family bucket."
                              },
                              "profit": {
                                "type": "number",
                                "description": "Profit margin of the family lines in the window, credit notes subtracted, rounded to 2 decimals. Can be negative (a family with credit notes only) and can be 0 (a family whose lines cancel out); a family whose lines all have zero margin has no row at all."
                              }
                            },
                            "required": [
                              "family_code",
                              "family_name",
                              "profit"
                            ]
                          },
                          "description": "One row per article family with profit margin in the window, in first-seen order (document date ascending). Empty when the month has no sales line carrying margin."
                        }
                      },
                      "required": [
                        "month",
                        "year",
                        "families"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/cash-flow-summary": {
      "get": {
        "summary": "Get the receipts and payments cash flow summary",
        "description": "Returns the money received from customers and the money paid to suppliers side by side, over three\n        windows: the current month, the previous month, the monthly average of the year so far and the\n        current-year total. Takes no parameters — the windows are anchored to the server clock, as the legacy\n        dashboard widget it replaces is. Only cancelled-free, account-updating documents that are either a\n        receipt or both debit and credit are counted; a receipt that only debits, and a payment that only\n        credits, are reversals and subtract. rows always holds exactly two entries, receipts first, then\n        payments. A money value of null means there were no documents in that window at all, while 0 means\n        there were documents and they sum to zero (a receipt cancelled by its reversal) — the two are\n        different and the distinction is part of the contract. Each row carries one series entry per billing\n        series with movement in any of the windows, ordered by series code, and every value of the row is the\n        sum of the same value across its series, up to rounding.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewCashFlowSummary",
          "privileges": [
            "vendas"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas). Receipts and supplier payments in one report, still gated by the sales privilege the widget carries."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CashFlowSummaryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/sales-summary": {
      "get": {
        "summary": "Get the sales summary",
        "description": "Returns the four rows of the sales summary dashboard widget over three windows: the current month, the\n        previous month, the monthly average of the year so far and the current-year total. Takes no parameters —\n        the windows are anchored to the server clock, as the legacy widget it replaces is. rows always holds\n        exactly four entries in this order: billing (invoiced amount, aggregated per document), goods and\n        services (aggregated per document line and filtered by article type), and goods_profit (the profit\n        margin of the goods lines, which can be negative). Only cancelled-free, account-updating, non-receipt\n        sales documents are counted; a document that only credits, and any credit note by SAFT type, subtracts.\n        A money value of null means there were no documents in that window at all, while 0 means there were\n        documents and they sum to zero — the two are different and the distinction is part of the contract. Each\n        row carries one series entry per billing series with movement in any of the windows, ordered by series\n        code, and every value of the row is the sum of the same value across its series, up to rounding. Note\n        that billing is a document-level total while goods and services are line-level, so the two do not\n        necessarily add up to it.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewSalesSummary",
          "privileges": [
            "vendas"
          ],
          "notes": "Mirrors the legacy dashboard widget gate (dashboard.privilege = vendas). Bare vendas, unlike viewSalesByArticleFamily, which mirrors a vendas&stocks widget. One of the four rows is the goods profit margin, which the same widget already showed under this gate."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesSummaryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/pending-documents": {
      "get": {
        "summary": "List pending provisional receipts",
        "description": "Returns the open sales documents (state=ABR, not cancelled) whose document type is in the clientes_cc_btn_provisorios tenant parameter, ordered by due date ascending. Mirrors the legacy dashboard widget: takes no parameters, and returns an empty list when the tenant parameter is empty or not configured.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewPendingProvisionalReceipts",
          "notes": "Free for the authenticated user. dashboard.privilege for this widget (id=84) is NULL today and out of scope to fill (card #2171 only asks for ogmf_id/module)."
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PendingProvisionalReceiptOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/monthly-goal": {
      "get": {
        "summary": "Get a monthly sales goal",
        "description": "Returns the configured sales goal and the achieved sales for the requested month and year on one of three\n        axes: a single employee (employee_id), a single commercial (commercial_id, keyed on CodVend), or the whole\n        company when neither is supplied. employee_id and commercial_id are mutually exclusive. Month and year\n        default to the current month/year when omitted.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewMonthlyGoal",
          "notes": "The gate depends on the requested axis: the caller's own employee goal is free (viewMonthlyGoal), another employee's goal requires viewOthersMonthlyGoal, the company goal requires viewCompanyMonthlyGoal, the goal of the commercial the caller is linked to is free (viewOwnCommercialMonthlyGoal) and any other commercial requires viewOthersCommercialMonthlyGoal."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "CodEmpr of the employee whose monthly sales goal is requested. Omit it (and commercial_id) to get the company-wide goal. Mutually exclusive with commercial_id.",
            "example": 1,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "commercial_id",
            "in": "query",
            "required": false,
            "description": "CodVend of the commercial whose monthly sales goal is requested. Mutually exclusive with employee_id.",
            "example": 3,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Month (1-12). Defaults to the current month when omitted.",
            "example": 7,
            "schema": {
              "type": "integer",
              "enum": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                10,
                11,
                12
              ]
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Year. Defaults to the current year when omitted.",
            "example": 2026,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonthlySalesGoalOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/goals-by-billing-series": {
      "get": {
        "summary": "Get goals per billing series and how much of each is achieved",
        "description": "Returns the configured goal of every billing series and the value achieved against it for the requested\n        window, on the axis picked by metric: sales goals (net sales, VAT excluded) or profit goals (profit margin).\n        Credit notes subtract, so achieved may be negative, while the percentages arrive clamped to 0-100. Only\n        series with a goal configured for the window and accessible to the caller are returned, ascending by series\n        code. Year defaults to the current year; omit month to report the annual goals, which are their own\n        configured rows and not the sum of the twelve monthly ones.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Sales\\Reports\\Policies\\SalesReportsPolicy",
          "ability": "viewGoalsByBillingSeries",
          "privileges": [
            "vendas",
            "relatorios:estadisticas"
          ],
          "notes": "Beyond the ability, the response is cut to the billing series the authenticated user has access to (legacy SeriesAccesso). A user with access to no series gets an empty report."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "description": "Goal axis to report. Required. Allowed: sales (sales goals, net sales excluding VAT) or profit (profit goals, profit margin).",
            "example": "sales",
            "schema": {
              "type": "string",
              "enum": [
                "sales",
                "profit"
              ]
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Calendar year of the goals. Defaults to the current year when omitted.",
            "example": 2026,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Month (1-12) of the goals. Omit to report the annual goals of the year, which are their own configured rows and not the sum of the twelve monthly ones.",
            "example": 8,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GoalsByBillingSeriesOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicles/plate": {
      "post": {
        "summary": "Resolve vehicle by plate",
        "description": "Searches a vehicle by plate in local workshop records and falls back to the external plate service when necessary.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:viaturas"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 15,
                    "description": "Vehicle plate to resolve"
                  },
                  "camera_plate_id": {
                    "type": "integer",
                    "description": "Camera plate record id to update after auto-creating the vehicle"
                  }
                },
                "required": [
                  "plate"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehiclePlateOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Vehicle plate not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicles/plate-readings": {
      "post": {
        "summary": "Read vehicle plate from image",
        "description": "Processes an uploaded image to recognize the vehicle plate using OCR.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:viaturas"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Image file containing the vehicle plate (JPEG, PNG, WebP, BMP, or GIF)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehiclePlateReadingOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicles/photos": {
      "post": {
        "summary": "Upload vehicle photo",
        "description": "Uploads a base64-encoded JPEG photo and attaches it to the vehicle identified in the payload.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "update",
          "privileges": [
            "oficinas:viaturas:edit"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "description": "Vehicle plate"
                  },
                  "name": {
                    "type": "string",
                    "description": "Legacy alias for vehicle plate"
                  },
                  "photo": {
                    "type": "string",
                    "description": "JPEG image encoded as base64 or data URI"
                  },
                  "url_safe": {
                    "type": "string",
                    "description": "If set, photo uses URL-safe base64 encoding"
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F",
                      "R",
                      "T"
                    ],
                    "description": "Entity type"
                  },
                  "entity_id": {
                    "type": "integer",
                    "description": "Entity ID"
                  },
                  "employee_id": {
                    "type": "integer",
                    "description": "Employee ID"
                  },
                  "employee": {
                    "type": "number"
                  },
                  "category_id": {
                    "type": "integer",
                    "description": "Attachment category ID"
                  },
                  "process_id": {
                    "type": "integer",
                    "description": "Process ID"
                  },
                  "id_process": {
                    "type": "number"
                  }
                },
                "required": [
                  "photo"
                ]
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicles": {
      "get": {
        "summary": "List vehicles",
        "description": "Returns a paginated list of vehicles with optional filtering.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:viaturas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle description",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "brand_id",
            "in": "query",
            "required": false,
            "description": "Filter by brand ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "model_id",
            "in": "query",
            "required": false,
            "description": "Filter by model ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "version_id",
            "in": "query",
            "required": false,
            "description": "Filter by version ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "color",
            "in": "query",
            "required": false,
            "description": "Filter by color",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fuel_id",
            "in": "query",
            "required": false,
            "description": "Filter by fuel type ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "owner_customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by owner client id",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "billing_customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by billing client id",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "km_counter",
            "in": "query",
            "required": false,
            "description": "Filter by kilometer counter",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "monthly_kms",
            "in": "query",
            "required": false,
            "description": "Filter by monthly kilometers",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "next_inspection_date",
            "in": "query",
            "required": false,
            "description": "Filter by next inspection date (exact)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "next_inspection_date_lte",
            "in": "query",
            "required": false,
            "description": "Filter vehicles with next inspection on or before this date",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "description": "Filter by active status",
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "created_by",
            "in": "query",
            "required": false,
            "description": "Filter by the ID of the employee who created the vehicle",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "is_stand",
            "in": "query",
            "required": false,
            "description": "Filter by Stand module status",
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_renting",
            "in": "query",
            "required": false,
            "description": "Filter by Rent-a-Car module status",
            "deprecated": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vin][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[vin][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[brand_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[brand_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[model_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[model_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[version_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[version_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[color][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[color][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[fuel_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[fuel_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[owner_customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[owner_customer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[billing_customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[billing_customer_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[km_counter][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[km_counter][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[monthly_kms][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[monthly_kms][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[next_inspection_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[next_inspection_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[next_inspection_date_lte][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[next_inspection_date_lte][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[is_active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[is_active][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[created_by][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[created_by][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[is_stand][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[is_stand][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[is_renting][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[is_renting][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create vehicle",
        "description": "Creates a new vehicle record.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "create",
          "privileges": [
            "oficinas:viaturas"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 15,
                    "description": "Vehicle plate (unique identifier)"
                  },
                  "vin": {
                    "type": "string",
                    "description": "Vehicle identification number (VIN)"
                  },
                  "brand_id": {
                    "type": "integer",
                    "description": "Brand ID"
                  },
                  "model_id": {
                    "type": "integer",
                    "description": "Model ID"
                  },
                  "version_id": {
                    "type": "integer",
                    "description": "Version ID"
                  },
                  "color": {
                    "type": "string",
                    "description": "Vehicle color"
                  },
                  "fuel_id": {
                    "type": "integer",
                    "description": "Fuel type ID"
                  },
                  "owner_customer_id": {
                    "type": "integer",
                    "description": "Owner client id"
                  },
                  "billing_customer_id": {
                    "type": "integer",
                    "description": "Billing client id"
                  },
                  "door_count": {
                    "type": "integer",
                    "description": "Number of doors"
                  },
                  "registration_plate_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Registration plate date (Y-m-d)"
                  },
                  "monthly_kms": {
                    "type": "integer",
                    "description": "Estimated monthly kilometers"
                  }
                },
                "required": [
                  "plate",
                  "brand_id",
                  "model_id",
                  "fuel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicles/{plate}/articles": {
      "get": {
        "summary": "List vehicle articles",
        "description": "Returns all articles used in documents and service orders for a given vehicle plate.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:viaturas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "plate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vehicle plate"
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "account_update",
            "in": "query",
            "required": false,
            "description": "Filter by account update flag",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleArticleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicles/{plate}/notes": {
      "get": {
        "summary": "List vehicle notes",
        "description": "Returns the notes of a vehicle, newest first, with the contexts each note is flagged for. Use context to receive only the notes flagged for that context.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehicleNotePolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:viaturas:tab:notas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "plate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vehicle plate"
          },
          {
            "name": "context",
            "in": "query",
            "required": false,
            "description": "Return only the notes flagged for this context. One of: sale, service_order, process, appointment",
            "example": "appointment",
            "schema": {
              "type": "string",
              "enum": [
                "sale",
                "service_order",
                "process",
                "appointment"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleNoteOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/vehicles/{plate}": {
      "get": {
        "summary": "Get vehicle details",
        "description": "Returns detailed information about a specific vehicle.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "view",
          "privileges": [
            "oficinas:viaturas:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "plate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vehicle plate"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update vehicle",
        "description": "Updates an existing vehicle record with the provided data.",
        "tags": [
          "Workshop",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Vehicle\\Policies\\VehiclePolicy",
          "ability": "update",
          "privileges": [
            "oficinas:viaturas:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "plate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vehicle plate"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vin": {
                    "type": "string",
                    "description": "Vehicle identification number (VIN)"
                  },
                  "brand_id": {
                    "type": "integer",
                    "description": "Brand ID"
                  },
                  "model_id": {
                    "type": "integer",
                    "description": "Model ID"
                  },
                  "version_id": {
                    "type": "integer",
                    "description": "Version ID"
                  },
                  "fuel_id": {
                    "type": "integer",
                    "description": "Fuel type ID"
                  },
                  "color": {
                    "type": "string",
                    "description": "Vehicle color"
                  },
                  "owner_customer_id": {
                    "type": "integer",
                    "description": "Owner client code"
                  },
                  "billing_customer_id": {
                    "type": "integer",
                    "description": "Billing client code"
                  },
                  "door_count": {
                    "type": "integer",
                    "description": "Number of doors"
                  },
                  "registration_plate_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Registration plate date (Y-m-d)"
                  },
                  "monthly_kms": {
                    "type": "integer",
                    "description": "Estimated monthly kilometers"
                  }
                },
                "required": [
                  "brand_id",
                  "model_id",
                  "fuel_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ams/parameters": {
      "get": {
        "summary": "Get AMS Parameters grouped by topic",
        "tags": [
          "AMS Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update AMS Parameters (partial)",
        "tags": [
          "AMS Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "numbering": {
                    "type": "object",
                    "properties": {
                      "flight_attendance_number_format": {
                        "type": "string",
                        "nullable": true
                      },
                      "flight_supply_number_format": {
                        "type": "string",
                        "nullable": true
                      },
                      "passenger_attendance_number_format": {
                        "type": "string",
                        "nullable": true
                      },
                      "transport_service_number_format": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "workflow": {
                    "type": "object",
                    "properties": {
                      "handling_confirmation_statuses": {
                        "type": "string",
                        "nullable": true
                      },
                      "passenger_service_confirmation_statuses": {
                        "type": "string",
                        "nullable": true
                      },
                      "quality_control_sheet_header": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "agenda": {
                    "type": "object",
                    "properties": {
                      "default_view": {
                        "type": "string",
                        "nullable": true
                      },
                      "business_days": {
                        "type": "array"
                      },
                      "hidden_days": {
                        "type": "array"
                      },
                      "business_hours_start": {
                        "type": "string",
                        "nullable": true
                      },
                      "business_hours_end": {
                        "type": "string",
                        "nullable": true
                      },
                      "show_time_start": {
                        "type": "string",
                        "nullable": true
                      },
                      "show_time_end": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/accounting/parameters": {
      "get": {
        "summary": "Get Accounting parameters grouped by topic",
        "tags": [
          "Accounting Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Accounting parameters (partial)",
        "tags": [
          "Accounting Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accounts": {
                    "type": "object",
                    "properties": {
                      "customer_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "customer_account_digits": {
                        "type": "integer"
                      },
                      "auto_customer_account": {
                        "type": "boolean"
                      },
                      "supplier_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "supplier_account_digits": {
                        "type": "integer"
                      },
                      "auto_supplier_account": {
                        "type": "boolean"
                      },
                      "customer_notes_receivable_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "customer_notes_receivable_account_digits": {
                        "type": "integer"
                      },
                      "customer_advance_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "customer_advance_account_digits": {
                        "type": "integer"
                      },
                      "auto_customer_advance_account": {
                        "type": "boolean"
                      },
                      "supplier_advance_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "supplier_advance_account_digits": {
                        "type": "integer"
                      },
                      "auto_supplier_advance_account": {
                        "type": "boolean"
                      },
                      "customer_advance_reverse_charge_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "customer_advance_reverse_charge_account_digits": {
                        "type": "integer"
                      },
                      "supplier_advance_reverse_charge_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "supplier_advance_reverse_charge_account_digits": {
                        "type": "integer"
                      },
                      "fixed_asset_supplier_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "fixed_asset_supplier_account_digits": {
                        "type": "integer"
                      },
                      "supplier_bills_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "supplier_bills_account_digits": {
                        "type": "integer"
                      },
                      "other_third_party_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "other_third_party_account_digits": {
                        "type": "integer"
                      },
                      "employee_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "employee_account_digits": {
                        "type": "integer"
                      },
                      "seller_base_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "seller_account_digits": {
                        "type": "integer"
                      },
                      "grouping_digits": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "0",
                          "1",
                          "2",
                          "3",
                          "4",
                          "5",
                          "6",
                          "7",
                          "8",
                          "9",
                          "10"
                        ]
                      }
                    }
                  },
                  "settlements": {
                    "type": "object",
                    "properties": {
                      "financial_discount_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "financial_discount_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "financial_income_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "financial_income_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "financial_discount_receipt_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "financial_discount_receipt_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "financial_income_payment_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "financial_income_payment_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "offsetting_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "bank_charges_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "positive_exchange_difference_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "negative_exchange_difference_account": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "rounding": {
                    "type": "object",
                    "properties": {
                      "positive_sales_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "positive_sales_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "negative_sales_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "negative_sales_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "positive_purchases_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "positive_purchases_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "negative_purchases_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "negative_purchases_cost_center": {
                        "type": "string",
                        "nullable": true
                      },
                      "positive_purchases_vat_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "negative_purchases_vat_account": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "vat": {
                    "type": "object",
                    "properties": {
                      "regime": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "monthly",
                          "quarterly"
                        ]
                      },
                      "uses_second_hand_margin_scheme": {
                        "type": "boolean"
                      },
                      "captive_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "captive_regularization_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "withholding_sales_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "withholding_purchases_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_withholding_on_receipt": {
                        "type": "boolean"
                      },
                      "uses_withholding_on_payment": {
                        "type": "boolean"
                      }
                    }
                  },
                  "markets": {
                    "type": "object",
                    "properties": {
                      "sales_digit_position": {
                        "type": "integer"
                      },
                      "sales_vat_digit_position": {
                        "type": "integer"
                      },
                      "purchases_digit_position": {
                        "type": "integer"
                      },
                      "purchases_vat_digit_position": {
                        "type": "integer"
                      },
                      "european_union_digit": {
                        "type": "integer"
                      },
                      "outside_european_union_digit": {
                        "type": "integer"
                      },
                      "uses_sales_journal": {
                        "type": "boolean"
                      },
                      "uses_purchases_journal": {
                        "type": "boolean"
                      }
                    }
                  },
                  "permanent_inventory": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "on_document",
                          "monthly",
                          "annual"
                        ]
                      },
                      "post_stock_movements": {
                        "type": "boolean"
                      },
                      "journal": {
                        "type": "string",
                        "nullable": true
                      },
                      "document": {
                        "type": "string",
                        "nullable": true
                      },
                      "purchases_accounts": {
                        "type": "array"
                      },
                      "goods_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "cost_of_goods_sold_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "cost_basis": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "document_average_cost",
                          "cost_recalculated_at_date"
                        ]
                      }
                    }
                  },
                  "fixed_assets": {
                    "type": "object",
                    "properties": {
                      "period_depreciation_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "accumulated_depreciation_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "capital_gains_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "capital_losses_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "sale_proceeds_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "disposal_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "write_off_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "revaluation_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "impairment_losses_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "impairment_reversal_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "accumulated_impairment_losses_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "revaluation_surplus_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "deferred_tax_liability_account": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "declarations": {
                    "type": "object",
                    "properties": {
                      "certified_accountant_tax_number": {
                        "type": "string",
                        "nullable": true
                      },
                      "accountant_tax_number": {
                        "type": "string",
                        "nullable": true
                      },
                      "declarant_tax_number": {
                        "type": "string",
                        "nullable": true
                      },
                      "company_tax_number": {
                        "type": "string",
                        "nullable": true
                      },
                      "tax_office_code": {
                        "type": "string",
                        "nullable": true
                      },
                      "ies_accounting_framework": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "1",
                          "2",
                          "3",
                          "4",
                          "5"
                        ]
                      },
                      "head_office_location": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "mainland",
                          "azores",
                          "madeira"
                        ]
                      }
                    }
                  },
                  "entries": {
                    "type": "object",
                    "properties": {
                      "sales_credit_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "sales_debit_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "purchases_credit_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "purchases_debit_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "show_direct_entries": {
                        "type": "boolean"
                      },
                      "block_manual_account": {
                        "type": "boolean"
                      },
                      "date_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "AUTO",
                          "LAST",
                          "NONE"
                        ]
                      },
                      "default_article_classification": {
                        "type": "string",
                        "nullable": true
                      },
                      "default_service_classification": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "analytics": {
                    "type": "object",
                    "properties": {
                      "uses_cost_accounting": {
                        "type": "boolean"
                      },
                      "uses_cost_centers_in_general_ledger": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/extra-fields": {
      "get": {
        "summary": "List article extra fields",
        "description": "Returns the extra field groups associated with the article and the value of each field. Requires the CamposExtra and STOCKS modules.",
        "tags": [
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticleExtraFieldPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Extra field groups of the article, each with its fields and values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string",
                                  "nullable": true
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Associate an extra field group with the article",
        "description": "Links an extra field group to the article and creates an empty value for each field of that group. Idempotent: an already linked group is returned unchanged.",
        "tags": [
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticleExtraFieldPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "group_id": {
                    "type": "integer",
                    "description": "Valid value from ArtExtraGroups.id."
                  }
                },
                "required": [
                  "group_id"
                ]
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update article extra field values",
        "description": "Updates the submitted extra field values. Each value is validated against the field type (checkbox, text, number, select); invalid values are returned in wrong_values and are not written.",
        "tags": [
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticleExtraFieldPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "extrafields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "value"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/articles/{article}/extra-fields/{id}": {
      "delete": {
        "summary": "Remove an extra field group from the article",
        "description": "Unlinks the extra field group from the article and deletes the values of its fields for that article. The {id} path parameter is the group id, not a field id.",
        "tags": [
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticleExtraFieldPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/attachments/categories": {
      "get": {
        "summary": "List attachment categories",
        "description": "Returns a paginated list of attachment categories with optional counts.",
        "tags": [
          "Attachment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Attachments\\Policies\\AttachmentPolicy",
          "ability": "viewAny",
          "privileges": [
            "gestaodocumental:attachments"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "include_private",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "get_counts",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AttachmentCategoryOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create attachment category",
        "description": "Creates a new attachment category.",
        "tags": [
          "Attachment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Attachments\\Policies\\AttachmentPolicy",
          "ability": "create",
          "privileges": [
            "gestaodocumental:attachments:create"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Category name"
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "Whether the category is active (default: true)"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentCategoryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/attachments/categories/{id}": {
      "patch": {
        "summary": "Update attachment category",
        "description": "Updates an existing attachment category.",
        "tags": [
          "Attachment Categories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Attachments\\Policies\\AttachmentPolicy",
          "ability": "update",
          "privileges": [
            "gestaodocumental:attachments:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Category name"
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "Whether the category is active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentCategoryOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/attachments": {
      "get": {
        "summary": "List attachments",
        "description": "Returns a paginated list of attachments with optional filtering by entity, document, category, article and more. Supports eager\n        loading of relations via include parameter.",
        "tags": [
          "Attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Attachments\\Policies\\AttachmentPolicy",
          "ability": "viewAny",
          "privileges": [
            "gestaodocumental:attachments"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by attachment ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by description (supports operators: sw, ew, ct, eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "description": "Filter by entity type (C=Client, F=Supplier, R=HR, T=Third-party)",
            "schema": {
              "type": "string",
              "enum": [
                "C",
                "F",
                "R",
                "T",
                "c",
                "f",
                "r",
                "t"
              ]
            }
          },
          {
            "name": "entity_id",
            "in": "query",
            "required": false,
            "description": "Filter by entity ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "description": "Filter by document type code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "description": "Filter by document number",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter by article code (supports operators: sw, ew, ct, eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "description": "Filter by category ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle plate (supports operators: sw, ew, ct, eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "process_code",
            "in": "query",
            "required": false,
            "description": "Filter by process code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "process_id",
            "in": "query",
            "required": false,
            "description": "Filter by process ID",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_type",
            "in": "query",
            "required": false,
            "description": "Filter by MIME type (supports operators: sw, ew, ct, eq)",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "Filter by origin (email, ftp, upload)",
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "ftp",
                "upload"
              ]
            }
          },
          {
            "name": "is_public",
            "in": "query",
            "required": false,
            "description": "Filter by public status, true/false or 1/0",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Filter by creation date (supports operators: gte, lte, eq)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Filter by update date (supports operators: gte, lte, eq)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Filter by attachment date (supports operators: gte, lte, eq)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "include_private",
            "in": "query",
            "required": false,
            "description": "Include private attachments (default: false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated relations to include (category, author, article)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[entity_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[entity_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[document_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[document_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[article_id][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[category_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[category_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[plate][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[process_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[process_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[process_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[process_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[file_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[file_type][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field, prefix with - for DESC (e.g., -created_at)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AttachmentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upload attachment",
        "description": "Uploads a file and creates an attachment record with optional entity association.",
        "tags": [
          "Attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Attachments\\Policies\\AttachmentPolicy",
          "ability": "create",
          "privileges": [
            "gestaodocumental:attachments:create"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File to upload"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Attachment description"
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F",
                      "P",
                      "R",
                      "E",
                      "T",
                      "Z"
                    ],
                    "description": "Entity type (C=Customer, F=Supplier, P=Prospect, R=Seller, E=Employee, T=Contact, Z=Common)"
                  },
                  "entity_id": {
                    "type": "integer",
                    "description": "Entity ID"
                  },
                  "document_type": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Document type code"
                  },
                  "document_number": {
                    "type": "integer",
                    "description": "Document number"
                  },
                  "article_id": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "Article code"
                  },
                  "category_id": {
                    "type": "integer",
                    "description": "Attachment category ID"
                  },
                  "plate": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Vehicle plate"
                  },
                  "process_code": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "Process code"
                  },
                  "process_id": {
                    "type": "string",
                    "description": "Workshop process ID"
                  },
                  "is_public": {
                    "type": "boolean",
                    "description": "Whether the attachment is public, true/false or 1/0 (default: true)"
                  }
                },
                "required": [
                  "file",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/attachments/{id}": {
      "patch": {
        "summary": "Update attachment",
        "description": "Updates attachment metadata. Does not change the file itself.",
        "tags": [
          "Attachments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Attachments\\Policies\\AttachmentPolicy",
          "ability": "update",
          "privileges": [
            "gestaodocumental:attachments:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Attachment description"
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F",
                      "P",
                      "R",
                      "E",
                      "T",
                      "Z"
                    ],
                    "description": "Entity type (C/F/P/R/E/T/Z)"
                  },
                  "entity_id": {
                    "type": "integer",
                    "description": "Entity ID"
                  },
                  "document_type": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Document type code"
                  },
                  "document_number": {
                    "type": "integer",
                    "description": "Document number"
                  },
                  "article_id": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "Article code"
                  },
                  "category_id": {
                    "type": "integer",
                    "description": "Attachment category ID"
                  },
                  "plate": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "Vehicle plate"
                  },
                  "process_code": {
                    "type": "string",
                    "maxLength": 50,
                    "description": "Process code"
                  },
                  "process_id": {
                    "type": "string",
                    "description": "Workshop process ID"
                  },
                  "is_public": {
                    "type": "boolean",
                    "description": "Public flag, true/false or 1/0"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "summary": "Authenticate user",
        "description": "Validates credentials and returns an access token with user data, company info, permissions and available modules.",
        "tags": [
          "Authentication"
        ],
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 255,
                    "description": "User login identifier"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 255,
                    "description": "User password"
                  }
                },
                "required": [
                  "username",
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AuthApiOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Invalid credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/auth/pre-login": {
      "get": {
        "summary": "Login screen context",
        "description": "Public endpoint. Returns the data the login screen needs before authentication: licensed areas and panels, virtual keyboard flag, multi-company list, available languages, branding assets for both themes, application version, demo state, license activity and Microsoft SSO availability.",
        "tags": [
          "Authentication"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreLoginOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "delete": {
        "summary": "Revoke session",
        "description": "Invalidates the current access token and ends the authenticated session.",
        "tags": [
          "Authentication"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Session terminated successfully.",
            "content": {
              "application/json": {
                "example": {
                  "message": "Logged out successfully"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "No active session or invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/banks/parameters": {
      "get": {
        "summary": "Get Banks Parameters grouped by topic",
        "tags": [
          "Banks Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Banks Parameters (partial)",
        "tags": [
          "Banks Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaults": {
                    "type": "object",
                    "properties": {
                      "default_bank": {
                        "type": "string",
                        "nullable": true
                      },
                      "default_bank_account": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "operations": {
                    "type": "object",
                    "properties": {
                      "card_payments_on_pos_terminal": {
                        "type": "boolean"
                      },
                      "required_cash_movement_fields": {
                        "type": "array"
                      },
                      "required_bank_operation_fields": {
                        "type": "array"
                      }
                    }
                  },
                  "interface": {
                    "type": "object",
                    "properties": {
                      "bank_account_label_format": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "account_type",
                          "account_description"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/appointments": {
      "get": {
        "summary": "List appointments",
        "description": "Returns a filtered list of appointments based on date range and optional criteria. With `search`, the date range becomes optional and the endpoint returns the matching appointments from any date, ranked by relevance and capped, with a `meta` object describing the cap.",
        "tags": [
          "CRM",
          "Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "viewAny",
          "privileges": [
            "crm:marcacoes:view:all"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "Start date filter. Required unless search is present, and always required together with end.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "End date filter (must be >= start). Required unless search is present, and always required together with start.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Text search on subject and customer name. When present, the date range becomes optional and the search is global; results are ranked by relevance and capped (see meta).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "Filter by employee ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "department_id",
            "in": "query",
            "required": false,
            "description": "Filter by department ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse/location code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "has_business_opportunity",
            "in": "query",
            "required": false,
            "description": "Filter appointments with/without business opportunity.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "rescheduled_from",
            "in": "query",
            "required": false,
            "description": "Filter appointments rescheduled from the given appointment ID.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CrmAppointmentOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create appointment",
        "description": "Creates a new appointment with scheduling validation and optional notifications.",
        "tags": [
          "CRM",
          "Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "create",
          "privileges": [
            "crm:marcacoes:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "description": "Appointment subject."
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Start date (Y-m-d)."
                  },
                  "start_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Start time (H:i)."
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date",
                    "description": "End date (Y-m-d), must be >= start_date."
                  },
                  "end_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "End time (H:i)."
                  },
                  "responsible_id": {
                    "type": "integer",
                    "description": "Responsible employee ID. Defaults to the authenticated user."
                  },
                  "employee_id": {
                    "type": "integer",
                    "description": "Assigned employee ID."
                  },
                  "seller_id": {
                    "type": "integer",
                    "description": "Seller/sales rep ID."
                  },
                  "department_id": {
                    "type": "integer",
                    "description": "Department ID."
                  },
                  "event_type_id": {
                    "type": "string",
                    "description": "Event type code."
                  },
                  "event_category_id": {
                    "type": "string",
                    "description": "Event category code."
                  },
                  "business_opportunity_id": {
                    "type": "string",
                    "description": "Business opportunity code."
                  },
                  "campaign_id": {
                    "type": "string",
                    "description": "Campaign code."
                  },
                  "priority": {
                    "type": "string",
                    "description": "Appointment priority."
                  },
                  "access_level": {
                    "type": "string",
                    "description": "Access level."
                  },
                  "rescheduled_from": {
                    "type": "integer",
                    "description": "Identifier of the appointment this one was rescheduled from."
                  },
                  "entity_id": {
                    "type": "integer",
                    "description": "Related entity ID."
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F",
                      "P",
                      "R",
                      "E",
                      "T",
                      "Z"
                    ],
                    "description": "Entity type (C=Customer, F=Supplier, P=Prospect, R=Seller, E=Employee, T=Contact, Z=Common)."
                  },
                  "contact_name": {
                    "type": "string",
                    "description": "Contact name."
                  },
                  "contact_phone": {
                    "type": "string",
                    "description": "Contact phone number."
                  },
                  "contact_phone_prefix": {
                    "type": "string",
                    "description": "Contact phone country prefix."
                  },
                  "location": {
                    "type": "string",
                    "description": "Appointment location."
                  },
                  "date_reception": {
                    "type": "string",
                    "format": "date",
                    "description": "Reception date (Y-m-d)."
                  },
                  "hour_reception": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Reception hour (H). Required if date_reception is set."
                  },
                  "date_expected_delivery": {
                    "type": "string",
                    "format": "date",
                    "description": "Expected delivery date (Y-m-d)."
                  },
                  "hour_expected_delivery": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Expected delivery hour (H). Required if date_expected_delivery is set."
                  },
                  "notify_email": {
                    "type": "integer",
                    "description": "Email notification flag."
                  },
                  "notify_message": {
                    "type": "integer",
                    "description": "Message notification flag."
                  },
                  "observations": {
                    "type": "string",
                    "description": "Appointment observations."
                  },
                  "report": {
                    "type": "string",
                    "description": "Appointment report."
                  },
                  "contacts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Additional contact identifiers."
                  }
                },
                "required": [
                  "subject",
                  "start_date",
                  "start_time",
                  "end_date",
                  "end_time"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CrmAppointmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/support/task-types": {
      "get": {
        "summary": "List task types",
        "description": "Returns all available task types.",
        "tags": [
          "CRM",
          "Task Types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\TaskTypes\\Policies\\TaskTypePolicy",
          "ability": "viewAny",
          "privileges": [
            "crm:marcacoes:view:all"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskTypeOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create task type",
        "description": "Creates a new task type with the provided configuration.",
        "tags": [
          "CRM",
          "Task Types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\TaskTypes\\Policies\\TaskTypePolicy",
          "ability": "create",
          "privileges": [
            "crm:marcacoes:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Task type code (unique)."
                  },
                  "name": {
                    "type": "string",
                    "description": "Task type name."
                  },
                  "icon": {
                    "type": "string",
                    "enum": [
                      "fa fa-tasks",
                      "fa fa-phone",
                      "fa fa-envelope-o",
                      "fas fa-user",
                      "fa fa-users",
                      "fas fa-user-circle",
                      "fas fa-user-tie",
                      "fas fa-user-secret",
                      "fas fa-user-ninja",
                      "fas fa-tasks",
                      "fas fa-thumbtack",
                      "fas fa-plane-departure",
                      "fas fa-skull-crossbones",
                      "fas fa-bell",
                      "fas fa-exclamation-triangle",
                      "fas fa-radiation",
                      "fas fa-car-crash",
                      "fas fa-charging-station",
                      "fas fa-gas-pump",
                      "fas fa-oil-can",
                      "fas fa-briefcase-medical",
                      "fas fa-ambulance",
                      "fas fa-bed",
                      "fas fa-person-booth",
                      "fas fa-binoculars",
                      "fas fa-box-open",
                      "fas fa-people-carry",
                      "fas fa-dolly",
                      "fas fa-warehouse",
                      "fas fa-hammer",
                      "fas fa-tools",
                      "fas fa-briefcase",
                      "fas fa-envelope-open-text",
                      "fas fa-graduation-cap",
                      "fas fa-video",
                      "fas fa-tag"
                    ],
                    "description": "Icon identifier."
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "dark",
                      "red",
                      "green",
                      "pink",
                      "orange",
                      "blue",
                      "purple",
                      "brown",
                      ""
                    ],
                    "description": "Label color."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the task type is active."
                  }
                },
                "required": [
                  "id",
                  "name",
                  "icon",
                  "active"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskTypeOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/appointments/upcoming": {
      "get": {
        "summary": "List own upcoming appointments",
        "description": "Returns appointments not yet done, from a start date (default today) up to an optional end date, ordered by id descending (or by start time with sort=start) and capped by limit, with `meta.total` counting every match before the limit. Scoped to the authenticated employee unless the caller has crm:marcacoes:view:all. Powers the OGMF \"Marcações\" dashboard widget (dashboard.id=2).",
        "tags": [
          "CRM",
          "Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "view",
          "privileges": [
            "crm:marcacoes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "Employee ID to list appointments for. Requires crm:marcacoes:view:all; ignored otherwise (the caller always sees their own appointments).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "is_done",
            "in": "query",
            "required": false,
            "description": "Filter by done status. Default: false (not yet done).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "Lower bound for the start date. Default: today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "Upper bound for the start date, inclusive of the whole day. Must not be before start. Default: none (open-ended).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Order applied before the limit: id (descending, default) or start (start time ascending).",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "start"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of appointments returned, after sorting. Default: 15. meta.total counts every match before the limit.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CrmAppointmentOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/appointments/{id}": {
      "get": {
        "summary": "Get appointment by ID",
        "description": "Returns detailed information for a specific appointment.",
        "tags": [
          "CRM",
          "Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "view",
          "privileges": [
            "crm:marcacoes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CrmAppointmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update appointment",
        "description": "Updates an existing appointment. Clearing `no_show` is rejected with 409 once at least one appointment has been rescheduled from this one.",
        "tags": [
          "CRM",
          "Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "update",
          "privileges": [
            "crm:marcacoes:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "description": "Appointment subject."
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Start date (Y-m-d)."
                  },
                  "start_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Start time (H:i)."
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date",
                    "description": "End date (Y-m-d)."
                  },
                  "end_time": {
                    "type": "string",
                    "format": "date-time",
                    "description": "End time (H:i)."
                  },
                  "responsible_id": {
                    "type": "integer",
                    "description": "Responsible employee ID."
                  },
                  "employee_id": {
                    "type": "integer",
                    "description": "Assigned employee ID."
                  },
                  "seller_id": {
                    "type": "integer",
                    "description": "Seller/sales rep ID."
                  },
                  "department_id": {
                    "type": "integer",
                    "description": "Department ID."
                  },
                  "event_type_id": {
                    "type": "string",
                    "description": "Event type code."
                  },
                  "event_category_id": {
                    "type": "string",
                    "description": "Event category code."
                  },
                  "business_opportunity_id": {
                    "type": "string",
                    "description": "Business opportunity code."
                  },
                  "campaign_id": {
                    "type": "string",
                    "description": "Campaign code."
                  },
                  "priority": {
                    "type": "string",
                    "description": "Appointment priority."
                  },
                  "access_level": {
                    "type": "string",
                    "description": "Access level."
                  },
                  "entity_id": {
                    "type": "integer",
                    "description": "Related entity ID."
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F",
                      "P",
                      "R",
                      "E",
                      "T",
                      "Z"
                    ],
                    "description": "Entity type (C=Customer, F=Supplier, P=Prospect, R=Seller, E=Employee, T=Contact, Z=Common)."
                  },
                  "contact_name": {
                    "type": "string",
                    "description": "Contact name."
                  },
                  "contact_phone": {
                    "type": "string",
                    "description": "Contact phone number."
                  },
                  "contact_phone_prefix": {
                    "type": "string",
                    "description": "Contact phone country prefix."
                  },
                  "location": {
                    "type": "string",
                    "description": "Appointment location."
                  },
                  "date_reception": {
                    "type": "string",
                    "format": "date",
                    "description": "Reception date (Y-m-d)."
                  },
                  "hour_reception": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Reception hour (H). Required if date_reception is set."
                  },
                  "date_expected_delivery": {
                    "type": "string",
                    "format": "date",
                    "description": "Expected delivery date (Y-m-d)."
                  },
                  "hour_expected_delivery": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Expected delivery hour (H). Required with date_expected_delivery."
                  },
                  "notify_email": {
                    "type": "integer",
                    "description": "Email notification flag."
                  },
                  "notify_message": {
                    "type": "integer",
                    "description": "Message notification flag."
                  },
                  "observations": {
                    "type": "string",
                    "description": "Appointment observations."
                  },
                  "report": {
                    "type": "string",
                    "description": "Appointment report."
                  },
                  "confirmed": {
                    "type": "boolean",
                    "description": "Whether the appointment is confirmed. Confirming is rejected while the appointment is (or becomes) no_show; an already-confirmed appointment keeps the flag."
                  },
                  "completed": {
                    "type": "boolean",
                    "description": "Whether the appointment is completed. Mutually exclusive with no_show."
                  },
                  "no_show": {
                    "type": "boolean",
                    "description": "Customer failed to show up. Mutually exclusive with completed. Reversible; no_show_at/no_show_by are server-computed."
                  },
                  "contacts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Additional contact identifiers."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CrmAppointmentOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete appointment",
        "description": "Removes an appointment from the system.",
        "tags": [
          "CRM",
          "Appointments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Appointments\\Policies\\AppointmentPolicy",
          "ability": "delete",
          "privileges": [
            "crm:marcacoes:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/business-opportunities": {
      "get": {
        "summary": "List open business opportunities",
        "description": "Returns the open business opportunities (not concluded), ordered by designation. Filter by entity with `entity_type` and `entity_id`, independently. Without crm:oportunidadesnegocios:view:all only the opportunities assigned to the caller are listed.",
        "tags": [
          "CRM",
          "Business Opportunities"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Opportunities\\Policies\\BusinessOpportunityPolicy",
          "ability": "viewAny",
          "privileges": [
            "crm:oportunidadesnegocios"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Exact opportunity code.",
            "example": "OPN2026001",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "description": "Entity type (C, F, P, R, E, T, Z). Applied on its own when entity_id is absent.",
            "example": "C",
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "C",
                "F",
                "P",
                "R",
                "E",
                "T",
                "Z"
              ]
            }
          },
          {
            "name": "entity_id",
            "in": "query",
            "required": false,
            "description": "Entity identifier. Applied on its own when entity_type is absent.",
            "example": 22,
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Partial match on the opportunity code or designation.",
            "example": "frota",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[entity_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[entity_type][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "C",
                "F",
                "P",
                "R",
                "E",
                "T",
                "Z"
              ]
            }
          },
          {
            "name": "filter[entity_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[entity_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OpportunityOptionOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/campaigns": {
      "get": {
        "summary": "List campaigns",
        "description": "Returns the marketing campaigns ordered by designation. Campaigns with an empty code are never listed. With the CRM_exclude_expired_schedule parameter on, campaigns whose end date has passed are left out, except when requested by `id`; campaigns without an end date stay.",
        "tags": [
          "CRM",
          "Campaigns"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Campaigns\\Policies\\CampaignPolicy",
          "ability": "viewAny",
          "privileges": [
            "crm:campanhas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Exact campaign code. Ignores CRM_exclude_expired_schedule, so a selected campaign that already ended can still be labelled.",
            "example": "CAMP2026",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Partial match on the campaign code or designation.",
            "example": "outono",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CampaignOptionOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/crm/support/task-types/{id}": {
      "get": {
        "summary": "Get task type by ID",
        "description": "Returns detailed information for a specific task type.",
        "tags": [
          "CRM",
          "Task Types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\TaskTypes\\Policies\\TaskTypePolicy",
          "ability": "view",
          "privileges": [
            "crm:marcacoes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskTypeOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update task type",
        "description": "Updates an existing task type.",
        "tags": [
          "CRM",
          "Task Types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\TaskTypes\\Policies\\TaskTypePolicy",
          "ability": "update",
          "privileges": [
            "crm:marcacoes:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "icon": {
                    "type": "string",
                    "enum": [
                      "fa fa-tasks",
                      "fa fa-phone",
                      "fa fa-envelope-o",
                      "fas fa-user",
                      "fa fa-users",
                      "fas fa-user-circle",
                      "fas fa-user-tie",
                      "fas fa-user-secret",
                      "fas fa-user-ninja",
                      "fas fa-tasks",
                      "fas fa-thumbtack",
                      "fas fa-plane-departure",
                      "fas fa-skull-crossbones",
                      "fas fa-bell",
                      "fas fa-exclamation-triangle",
                      "fas fa-radiation",
                      "fas fa-car-crash",
                      "fas fa-charging-station",
                      "fas fa-gas-pump",
                      "fas fa-oil-can",
                      "fas fa-briefcase-medical",
                      "fas fa-ambulance",
                      "fas fa-bed",
                      "fas fa-person-booth",
                      "fas fa-binoculars",
                      "fas fa-box-open",
                      "fas fa-people-carry",
                      "fas fa-dolly",
                      "fas fa-warehouse",
                      "fas fa-hammer",
                      "fas fa-tools",
                      "fas fa-briefcase",
                      "fas fa-envelope-open-text",
                      "fas fa-graduation-cap",
                      "fas fa-video",
                      "fas fa-tag"
                    ]
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "dark",
                      "red",
                      "green",
                      "pink",
                      "orange",
                      "blue",
                      "purple",
                      "brown",
                      ""
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskTypeOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete task type",
        "description": "Removes a task type and returns the remaining task types.",
        "tags": [
          "CRM",
          "Task Types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Crm\\Support\\TaskTypes\\Policies\\TaskTypePolicy",
          "ability": "delete",
          "privileges": [
            "crm:marcacoes:delete"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskTypeOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/contracts/parameters": {
      "get": {
        "summary": "Get Contracts Parameters grouped by topic",
        "tags": [
          "Contracts Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Contracts Parameters (partial)",
        "tags": [
          "Contracts Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "documents": {
                    "type": "object",
                    "properties": {
                      "sale_document_types": {
                        "type": "array"
                      },
                      "generate_as_draft": {
                        "type": "boolean"
                      },
                      "new_document_uses_associated_article": {
                        "type": "boolean"
                      },
                      "new_document_manpower_article": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "movements": {
                    "type": "object",
                    "properties": {
                      "stock_movement_type_in": {
                        "type": "string",
                        "nullable": true
                      },
                      "stock_movement_type_out": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "manpower": {
                    "type": "object",
                    "properties": {
                      "manpower_period": {
                        "type": "integer"
                      },
                      "manpower_minimum_quantity": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/addresses": {
      "get": {
        "summary": "List customer addresses",
        "description": "Returns all addresses for a specific customer. Supports filtering, sorting and pagination.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by address description",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "Filter by city",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "description": "Filter by postal code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "description": "Filter by country code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "description": "Filter by phone number",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tax_id",
            "in": "query",
            "required": false,
            "description": "Filter by tax ID",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "query",
            "required": false,
            "description": "Filter by contact",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix with - for DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, sw. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[contact][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[contact][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters: filter[field][operator]=value",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerAddressOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create customer address",
        "description": "Creates a new address for a specific customer.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "city": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 30
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 2,
                    "maxLength": 3,
                    "description": "Valid value from paises.codpais."
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "address_web_id": {
                    "type": "integer",
                    "nullable": true
                  },
                  "sync_flag": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "tax_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 30
                  }
                },
                "required": [
                  "description",
                  "address",
                  "city",
                  "postal_code"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/extra-fields": {
      "get": {
        "summary": "List customer extra fields",
        "description": "Returns all extra fields (Campos Extra) configured for the customer. Requires CamposExtra module.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:clientes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExtraFieldOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update customer extra fields",
        "description": "Upserts the submitted extra field values for the customer. Only the submitted ids are touched; fields left out keep their current value. Requires CamposExtra module.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "update",
          "privileges": [
            "entidades:clientes:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "extra_fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "value": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "description": "Extra field values to upsert. Only the submitted ids are touched.",
                    "example": [
                      {
                        "id": 156,
                        "value": "ACME"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/movements": {
      "get": {
        "summary": "List customer movements",
        "description": "Returns all movements (account history) for a customer with optional filtering by date range, document type, and state.",
        "tags": [
          "Customers"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Filter by document type",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Filter by document state",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Filter by document date (Y-m-d)",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "Start date filter (Y-m-d)",
            "example": "2024-01-01",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "End date filter (Y-m-d)",
            "example": "2024-12-31",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by type with operators Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[state][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by state with operators Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[state][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by date with operators Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[start_date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by start date with operators Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[start_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by end date with operators Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[end_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters: filter[field][operator]=value",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerMovementOutputDTO"
                      }
                    },
                    "meta": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PaginationMeta"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "balance": {
                              "type": "number",
                              "description": "Current account balance of the customer (debit minus credit), not limited to the page."
                            }
                          },
                          "required": [
                            "balance"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/balance": {
      "get": {
        "summary": "Get customer balance",
        "description": "Returns the current account balance for a customer.",
        "tags": [
          "Customers"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the current balance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/debits": {
      "get": {
        "summary": "List customer debits",
        "description": "Returns all debits (receivables) for a specific customer. Supports filtering by date range, document type, payment status, and\n        more.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort field (e.g., date, due_date, total)",
            "example": "date",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "description": "Sort direction (ASC/DESC)",
            "example": "DESC",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Alias for sorder",
            "example": "desc",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Filter by document type",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "description": "Filter by document number",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type_description",
            "in": "query",
            "required": false,
            "description": "Filter by document type description",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_number",
            "in": "query",
            "required": false,
            "description": "Filter by document number",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by customer name",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_tax_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer tax ID",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendor_code",
            "in": "query",
            "required": false,
            "description": "Filter by vendor code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vendor_name",
            "in": "query",
            "required": false,
            "description": "Filter by vendor name",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Filter by document date (Y-m-d)",
            "example": "2024-01-15",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "due_date",
            "in": "query",
            "required": false,
            "description": "Filter by due date (Y-m-d)",
            "example": "2024-02-15",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "total",
            "in": "query",
            "required": false,
            "description": "Filter by total amount",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "amount_paid",
            "in": "query",
            "required": false,
            "description": "Filter by amount paid",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "amount_to_pay",
            "in": "query",
            "required": false,
            "description": "Filter by amount to pay",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "payment_method",
            "in": "query",
            "required": false,
            "description": "Filter by payment method code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days_late",
            "in": "query",
            "required": false,
            "description": "Filter by days late",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "debit",
            "in": "query",
            "required": false,
            "description": "Filter by debit amount",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "description": "Filter by credit amount",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "balance",
            "in": "query",
            "required": false,
            "description": "Filter by balance",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "subtract_retention",
            "in": "query",
            "required": false,
            "description": "Subtract retention from totals (T/F)",
            "example": "T",
            "schema": {
              "type": "string",
              "enum": [
                "T",
                "F"
              ]
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document type with operators Operators: eq, ct, sw, ew, in. Example: filter[type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[number][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document number with operators Operators: eq, ct, sw, ew, in. Example: filter[number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[type_description][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document type description with operators Operators: eq, ct, sw, ew, in. Example: filter[type_description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[document_number][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document number with operators Operators: eq, ct, sw, ew, in. Example: filter[document_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by customer ID with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by customer name with operators Operators: eq, ct, sw, ew, in. Example: filter[name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_tax_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by customer tax ID with operators Operators: eq, ct, sw, ew, in. Example: filter[customer_tax_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_code][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by vendor code with operators Operators: eq, ct, sw, ew, in. Example: filter[vendor_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vendor_name][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by vendor name with operators Operators: eq, ct, sw, ew, in. Example: filter[vendor_name][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by document date with operators (eq, gte, lte, gt, lt) Operators: eq, gte, lte, gt, lt, in. Example: filter[date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[due_date][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by due date with operators (eq, gte, lte, gt, lt) Operators: eq, gte, lte, gt, lt, in. Example: filter[due_date][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[total][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by total amount with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[total][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[amount_paid][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by amount paid with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[amount_paid][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[amount_to_pay][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by amount to pay with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[amount_to_pay][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[payment_method][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by payment method with operators Operators: eq, ct, sw, ew, in. Example: filter[payment_method][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[days_late][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by days late with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[days_late][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[debit][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by debit with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[debit][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[credit][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by credit with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[credit][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[balance][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by balance with operators Operators: eq, gte, lte, gt, lt, in. Example: filter[balance][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters: filter[field][operator]=value. Operators: eq, ct, sw, ew, in, gte, lte, gt, lt",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "filter[start_date]",
            "in": "query",
            "required": false,
            "description": "Start date filter (Y-m-d)",
            "example": "2024-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date]",
            "in": "query",
            "required": false,
            "description": "End date filter (Y-m-d)",
            "example": "2024-12-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerDebitOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/addresses/{address}": {
      "get": {
        "summary": "Show customer address",
        "description": "Returns a single address for a specific customer.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update customer address",
        "description": "Updates fields of a specific customer address. All fields are optional.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "city": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 2,
                    "maxLength": 3,
                    "description": "Valid value from paises.codpais."
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20
                  },
                  "address_web_id": {
                    "type": "integer",
                    "nullable": true
                  },
                  "sync_flag": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "tax_id": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 30
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/business-areas": {
      "get": {
        "summary": "List customer business areas",
        "description": "Returns all business areas (CRM) associated with a customer. Requires CRM module.",
        "tags": [
          "Customers"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by business area ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by business area description",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by ID with operators Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by description with operators (sw, ew, ct, eq) Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters: filter[field][operator]=value",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BusinessAreaOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/prices": {
      "get": {
        "summary": "List customer price tables",
        "description": "Returns all price table entries for a specific customer. Supports filtering, sorting and pagination.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter by article ID",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "family_code",
            "in": "query",
            "required": false,
            "description": "Filter by family code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfamily_code",
            "in": "query",
            "required": false,
            "description": "Filter by subfamily code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subsubfamily_code",
            "in": "query",
            "required": false,
            "description": "Filter by sub-subfamily code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_method_code",
            "in": "query",
            "required": false,
            "description": "Filter by payment method code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_type",
            "in": "query",
            "required": false,
            "description": "Filter by article type",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_code",
            "in": "query",
            "required": false,
            "description": "Filter by currency code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "query",
            "required": false,
            "description": "Filter by price value",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "discount",
            "in": "query",
            "required": false,
            "description": "Filter by discount",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "brand_id",
            "in": "query",
            "required": false,
            "description": "Filter by brand ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix with - for DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew, in. Example: filter[article_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[family_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[family_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[subfamily_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[subfamily_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[subsubfamily_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[subsubfamily_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[payment_method_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[payment_method_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[article_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[article_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[currency_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[currency_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[value][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte, gt, lt. Example: filter[value][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[discount][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte, gt, lt. Example: filter[discount][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[brand_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[brand_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters: filter[field][operator]=value",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerPriceTableOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/customers/{customer}/graphs/{graph_type}": {
      "get": {
        "summary": "Show customer graph",
        "description": "Returns a normalized graph payload for a specific customer. Supported graph types are sales_per_month and best_sellers.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:clientes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "graph_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Selected year for the sales_per_month graph.",
            "example": 2025,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "Start date for the best_sellers graph.",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "End date for the best_sellers graph.",
            "example": "2026-12-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "article_type",
            "in": "query",
            "required": false,
            "description": "Article type for the best_sellers graph. Accepted values: N or S.",
            "example": "N",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerGraphOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/dms/parameters": {
      "get": {
        "summary": "Get DMS Parameters grouped by topic",
        "tags": [
          "DMS Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update DMS Parameters (partial)",
        "tags": [
          "DMS Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "object",
                    "properties": {
                      "email_provider": {
                        "type": "string",
                        "nullable": true
                      },
                      "email_host": {
                        "type": "string",
                        "nullable": true
                      },
                      "email_port": {
                        "type": "integer"
                      },
                      "email_protocol": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "imap",
                          "pop"
                        ]
                      },
                      "email_encryption": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "ssl",
                          "tls"
                        ]
                      },
                      "email_username": {
                        "type": "string",
                        "nullable": true
                      },
                      "email_password": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "ftp": {
                    "type": "object",
                    "properties": {
                      "ftp_server": {
                        "type": "string",
                        "nullable": true
                      },
                      "ftp_username": {
                        "type": "string",
                        "nullable": true
                      },
                      "ftp_password": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "microsoft": {
                    "type": "object",
                    "properties": {
                      "microsoft_client_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "microsoft_tenant_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "microsoft_redirect_uri": {
                        "type": "string",
                        "nullable": true
                      },
                      "microsoft_client_secret": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/documents": {
      "get": {
        "summary": "List all ecovalue movements",
        "description": "Movements ordered by date, oldest first. running_quantity accumulates over every matching movement, not only the current page.",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EVM\\Policies\\EcovaluePolicy",
          "ability": "viewAny",
          "privileges": [
            "evm:board"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by warehouse (codloja). Repeat as warehouse_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by article (codartigo). Repeat as article_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by customer (codterc). Repeat as customer_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EcovalueMovementOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/articles": {
      "get": {
        "summary": "List ecovalue totals grouped by article",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EVM\\Policies\\EcovaluePolicy",
          "ability": "viewAny",
          "privileges": [
            "evm:board"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by warehouse (codloja). Repeat as warehouse_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by article (codartigo). Repeat as article_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by customer (codterc). Repeat as customer_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerEcovalueArticleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/customers": {
      "get": {
        "summary": "List ecovalue totals grouped by customer",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EVM\\Policies\\EcovaluePolicy",
          "ability": "viewAny",
          "privileges": [
            "evm:board"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by warehouse (codloja). Repeat as warehouse_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by article (codartigo). Repeat as article_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by customer (codterc). Repeat as customer_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleEcovalueCustomerOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/warehouses": {
      "get": {
        "summary": "List ecovalue totals grouped by warehouse",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EVM\\Policies\\EcovaluePolicy",
          "ability": "viewAny",
          "privileges": [
            "evm:board"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by warehouse (codloja). Repeat as warehouse_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by article (codartigo). Repeat as article_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by customer (codterc). Repeat as customer_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleEcovalueWarehouseOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/metrics": {
      "get": {
        "summary": "Ecovalue dashboard counters",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EVM\\Policies\\EcovaluePolicy",
          "ability": "viewAny",
          "privileges": [
            "evm:board"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by warehouse (codloja). Repeat as warehouse_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by article (codartigo). Repeat as article_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by customer (codterc). Repeat as customer_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ecovalue counters payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/entries": {
      "get": {
        "summary": "List ecovalue entry movements (quantity > 0)",
        "description": "Movements ordered by date, oldest first. running_quantity accumulates over every matching movement, not only the current page.",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EVM\\Policies\\EcovaluePolicy",
          "ability": "entries",
          "privileges": [
            "evm:movimento-entrada"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by warehouse (codloja). Repeat as warehouse_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by article (codartigo). Repeat as article_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by customer (codterc). Repeat as customer_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EcovalueMovementOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/exits": {
      "get": {
        "summary": "List ecovalue exit movements (quantity < 0)",
        "description": "Movements ordered by date, oldest first. running_quantity accumulates over every matching movement, not only the current page.",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EVM\\Policies\\EcovaluePolicy",
          "ability": "exits",
          "privileges": [
            "evm:movimento-saida"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by warehouse (codloja). Repeat as warehouse_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by article (codartigo). Repeat as article_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter movements by customer (codterc). Repeat as customer_id[] for multiple; a single value is also accepted.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last movement date included.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EcovalueMovementOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/customers/{customer}/documents": {
      "get": {
        "summary": "List customer ecovalue documents",
        "description": "Movements ordered by date, newest first.",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:clientes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerEcovalueMovementOutputDTO"
                      }
                    },
                    "meta": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/PaginationMeta"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "balance": {
                              "type": "object",
                              "description": "Ecovalue balance of the customer over every matching movement, not only the current page.",
                              "properties": {
                                "quantity": {
                                  "type": "number"
                                },
                                "total_without_vat": {
                                  "type": "number"
                                }
                              }
                            }
                          },
                          "required": [
                            "balance"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/customers/{customer}/articles": {
      "get": {
        "summary": "List customer ecovalue article totals",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:clientes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerEcovalueArticleOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/customers/{customer}/report": {
      "get": {
        "summary": "Generate customer ecovalue report PDF",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Customers\\Policies\\CustomerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:clientes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First date included in the report.",
            "example": "2026-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last date included in the report.",
            "example": "2026-12-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "description": "Filter the report by warehouse (codloja). Repeat as warehouse_id[] for multiple.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "description": "Filter the report by article (codartigo). Repeat as article_id[] for multiple.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ecovalues report in PDF format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/articles/{article}/documents": {
      "get": {
        "summary": "List article ecovalue documents",
        "description": "Movements ordered by date, newest first.",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleEcovalueMovementOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/articles/{article}/customers": {
      "get": {
        "summary": "List article ecovalue customer totals",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleEcovalueCustomerOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/evm/articles/{article}/warehouses": {
      "get": {
        "summary": "List article ecovalue warehouse totals",
        "tags": [
          "EVM"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ArticleEcovalueWarehouseOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/gallery/photos": {
      "post": {
        "summary": "Upload photo",
        "description": "Uploads a base64-encoded JPEG photo and associates it with one or more components.",
        "tags": [
          "EcoAuto",
          "Gallery"
        ],
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Photo name",
                    "example": "front-bumper"
                  },
                  "photo": {
                    "type": "string",
                    "description": "Base64-encoded JPEG image"
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F",
                      "R",
                      "T"
                    ],
                    "description": "Entity type (C=Customer, F=Supplier, R=Other, T=All)",
                    "example": "C"
                  },
                  "entity_id": {
                    "type": "integer",
                    "description": "Entity ID"
                  },
                  "category_id": {
                    "type": "integer",
                    "description": "Attachment category ID"
                  },
                  "url_safe": {
                    "type": "boolean",
                    "description": "Whether the base64 uses URL-safe encoding"
                  },
                  "component_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "Component IDs to associate the photo with",
                    "example": [
                      39807
                    ]
                  }
                },
                "required": [
                  "name",
                  "photo"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GalleryPhotoOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/gallery/photos/attach": {
      "post": {
        "summary": "Attach existing photos",
        "description": "Associates one or more existing attachments with one or more components.",
        "tags": [
          "EcoAuto",
          "Gallery"
        ],
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "attachment_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "Existing attachment IDs to associate",
                    "example": [
                      7541,
                      7542
                    ]
                  },
                  "component_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "Component IDs to receive the attachments",
                    "example": [
                      39807,
                      39808
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GalleryPhotoOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes": {
      "get": {
        "summary": "List processes",
        "description": "Returns a paginated list of dismantling processes with filters and sorting.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "process_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "is_deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "sector_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "test_checklist",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[process_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw. Example: filter[process_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[status][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[status][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[type][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[is_deleted][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[is_deleted][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[barcode][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[barcode][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[sector_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[sector_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[test_checklist][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[test_checklist][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EcoAuto__ProcessOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create process",
        "description": "Creates a dismantling process from an existing plate or vehicle details.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "create",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plate": {
                    "type": "string",
                    "maxLength": 15,
                    "description": "Existing vehicle plate.",
                    "example": "AA-00-AA"
                  },
                  "sector_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Warehouse sector ID.",
                    "example": 2
                  },
                  "operator_code": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255,
                    "description": "Operator identifier.",
                    "example": "OP01"
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true
                  },
                  "type": {
                    "type": "number",
                    "nullable": true,
                    "description": "Process type code.",
                    "example": 1
                  },
                  "details": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "brand_id": {
                        "type": "number",
                        "nullable": true
                      },
                      "model_id": {
                        "type": "number",
                        "nullable": true
                      },
                      "version_id": {
                        "type": "number",
                        "nullable": true
                      },
                      "fuel_id": {
                        "type": "number",
                        "nullable": true
                      },
                      "generation_id": {
                        "type": "number",
                        "nullable": true
                      },
                      "year": {
                        "type": "number",
                        "nullable": true
                      },
                      "month": {
                        "type": "number",
                        "nullable": true
                      },
                      "doors": {
                        "type": "number",
                        "nullable": true
                      },
                      "chassis": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 60
                      },
                      "kms": {
                        "type": "number",
                        "nullable": true
                      },
                      "power": {
                        "type": "number",
                        "nullable": true
                      },
                      "engine_code": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 255
                      },
                      "notes": {
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "description": "Vehicle details used when plate does not exist yet."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessDetailOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "Vehicle already has an active process.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes/{process}/dismantle": {
      "post": {
        "summary": "Dismantle process",
        "description": "Bulk transition of a process to PDISM/PREN with category and component overrides.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "dismantle",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "PDISM",
                      "PREN"
                    ],
                    "description": "New process status code.",
                    "example": "PDISM"
                  },
                  "category": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "checked": {
                          "type": "number"
                        },
                        "modified": {
                          "type": "number"
                        }
                      }
                    },
                    "description": "Categories state keyed by category ID."
                  },
                  "components": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "cat": {
                          "type": "number"
                        },
                        "checked": {
                          "type": "number"
                        },
                        "modified": {
                          "type": "number"
                        }
                      }
                    },
                    "description": "Individual component state overrides."
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessDetailOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Process not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/gallery/{type}/{id}": {
      "get": {
        "summary": "List gallery photos",
        "description": "Returns a paginated list of the photos of a process or component, main photo first, then by attachment id.",
        "tags": [
          "EcoAuto",
          "Gallery"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GalleryPhotoOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/lookups/inspection-statuses": {
      "get": {
        "summary": "Inspection statuses",
        "description": "Returns inspection statuses used for engine, gearbox and battery assessment.",
        "tags": [
          "EcoAuto",
          "Lookups"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LookupOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/lookups/gearbox-types": {
      "get": {
        "summary": "Gearbox types",
        "description": "Returns gearbox mechanical types.",
        "tags": [
          "EcoAuto",
          "Lookups"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LookupOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/parts/types": {
      "get": {
        "summary": "Part types",
        "description": "Returns part types for sale and stock classification.",
        "tags": [
          "EcoAuto",
          "Lookups"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LookupOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/parts/statuses": {
      "get": {
        "summary": "Part statuses",
        "description": "Returns part processing statuses with color hints.",
        "tags": [
          "EcoAuto",
          "Lookups"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LookupOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/parts/categories": {
      "get": {
        "summary": "List categories",
        "description": "Returns a paginated list of active part categories.",
        "tags": [
          "EcoAuto",
          "Parts"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[is_active][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CategoryOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/parts/components": {
      "get": {
        "summary": "List components",
        "description": "Returns a paginated list of active part components with category info.",
        "tags": [
          "EcoAuto",
          "Parts"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "article_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[article_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[article_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[category_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[category_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[is_active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[is_active][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PartComponentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/parts/sectors": {
      "get": {
        "summary": "List sectors",
        "description": "Returns a paginated list of active warehouse sectors. Requires SETORES module.",
        "tags": [
          "EcoAuto",
          "Parts"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SectorOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/checklists": {
      "get": {
        "summary": "List checklist items",
        "description": "Returns active checklist items. When process_id is provided, includes conformity values.",
        "tags": [
          "EcoAuto",
          "Checklist"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array"
            }
          },
          {
            "name": "process_id",
            "in": "query",
            "required": false,
            "description": "When provided, includes conformity values for this process.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChecklistOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/checklists/values": {
      "get": {
        "summary": "List checklist values",
        "description": "Returns active conformity values for checklist items.",
        "tags": [
          "EcoAuto",
          "Checklist"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChecklistValueOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes/count": {
      "get": {
        "summary": "Count processes",
        "description": "Returns the total number of active processes matching the filters.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "nullable": true
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "process_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "is_deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "sector_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "test_checklist",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[process_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw. Example: filter[process_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[status][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[status][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[type][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[is_deleted][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[is_deleted][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[barcode][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[barcode][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[sector_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[sector_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[test_checklist][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[test_checklist][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count envelope: {\"data\": {\"count\": N}}.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes/barcode/{barcode}": {
      "get": {
        "summary": "Find process by barcode",
        "description": "Locates a process by its printed barcode.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "view",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "barcode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessDetailOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "No process matches the barcode.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes/{process}/dismantlement": {
      "get": {
        "summary": "Process dismantlement tree",
        "description": "Aggregated process + vehicle + categorized components for the dismantling flow.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "view",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DismantlementOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Process not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes/{process}": {
      "get": {
        "summary": "Show process",
        "description": "Returns a single dismantling process by ID.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "view",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessDetailOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Process not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/vehicles/{plate}": {
      "get": {
        "summary": "Lookup vehicle by plate",
        "description": "Returns vehicle details and whether it already has an active EcoAuto process.",
        "tags": [
          "EcoAuto",
          "Vehicles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "view",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "plate",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleLookupOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Vehicle plate not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes/{process}/checklists/{checklist}": {
      "patch": {
        "summary": "Update checklist item value",
        "description": "Updates the conformity value for a checklist item in a specific process.",
        "tags": [
          "EcoAuto",
          "Checklist"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "checklist",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "integer",
                    "description": "Conformity value ID (must be an active checklist value)"
                  }
                },
                "required": [
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChecklistProcessOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Checklist process item not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/processes/{process}/test-checklist": {
      "patch": {
        "summary": "Update test checklist flag",
        "description": "Sets whether the vehicle passed the test checklist.",
        "tags": [
          "EcoAuto",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\EcoAuto\\Policies\\ProcessPolicy",
          "ability": "updateChecklist",
          "privileges": [
            "ecoauto"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "test_checklist": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1"
                    ],
                    "description": "Whether the vehicle passed the test checklist (0 or 1).",
                    "example": 1
                  }
                },
                "required": [
                  "test_checklist"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessDetailOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Process not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/ecoauto/gallery/{type}/photos/{attachment}": {
      "delete": {
        "summary": "Delete photo",
        "description": "Removes a photo from all associated processes or components. Cleans up orphaned attachments and files.",
        "tags": [
          "EcoAuto",
          "Gallery"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Photo deleted successfully",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Attachment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/employees/{employee}/extra-fields": {
      "get": {
        "summary": "List employee extra fields",
        "description": "Returns all extra fields (Campos Extra) configured for the employee. Requires CamposExtra module.",
        "tags": [
          "Entities",
          "Employees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Employees\\Policies\\EmployeePolicy",
          "ability": "view",
          "privileges": [
            "entidades:empregados:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "employee",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExtraFieldOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/general/parameters": {
      "get": {
        "summary": "Get General parameters grouped by topic",
        "tags": [
          "General Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update General parameters (partial)",
        "tags": [
          "General Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaults": {
                    "type": "object",
                    "properties": {
                      "barcode_type": {
                        "type": "string",
                        "nullable": true
                      },
                      "barcode_magnitude": {
                        "type": "string",
                        "nullable": true
                      },
                      "interleaved_2of5_digits": {
                        "type": "string",
                        "nullable": true
                      },
                      "store": {
                        "type": "string",
                        "nullable": true
                      },
                      "vat_code": {
                        "type": "string",
                        "nullable": true
                      },
                      "vat_exemption_reason": {
                        "type": "string",
                        "nullable": true
                      },
                      "profit_margin": {
                        "type": "integer"
                      },
                      "currency": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_extra_currency": {
                        "type": "boolean"
                      },
                      "country": {
                        "type": "string",
                        "nullable": true
                      },
                      "payment_method": {
                        "type": "string",
                        "nullable": true
                      },
                      "task_type": {
                        "type": "string",
                        "nullable": true
                      },
                      "cash_register": {
                        "type": "string",
                        "nullable": true
                      },
                      "customer_classification": {
                        "type": "string",
                        "nullable": true
                      },
                      "automated_employee": {
                        "type": "string",
                        "nullable": true
                      },
                      "ao_uses_vat": {
                        "type": "boolean"
                      },
                      "period": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "weekly",
                          "monthly",
                          "quarterly",
                          "semiannual"
                        ]
                      },
                      "article_code_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "0",
                          "1",
                          "2",
                          "3",
                          "4",
                          "5",
                          "6",
                          "7"
                        ]
                      },
                      "article_code_separator": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "documents": {
                    "type": "object",
                    "properties": {
                      "default_series": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_series": {
                        "type": "boolean"
                      },
                      "uses_series_background_image": {
                        "type": "boolean"
                      },
                      "days_to_change": {
                        "type": "string",
                        "nullable": true
                      },
                      "scroll_lines": {
                        "type": "integer"
                      },
                      "print_country": {
                        "type": "boolean"
                      }
                    }
                  },
                  "email": {
                    "type": "object",
                    "properties": {
                      "smtp_provider": {
                        "type": "string",
                        "nullable": true
                      },
                      "smtp_host": {
                        "type": "string",
                        "nullable": true
                      },
                      "smtp_port": {
                        "type": "integer"
                      },
                      "smtp_encryption": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "ssl",
                          "tls"
                        ]
                      },
                      "uses_smtp_auth": {
                        "type": "boolean"
                      },
                      "smtp_user": {
                        "type": "string",
                        "nullable": true
                      },
                      "smtp_password": {
                        "type": "string",
                        "nullable": true
                      },
                      "from_address": {
                        "type": "string",
                        "nullable": true,
                        "format": "email"
                      },
                      "from_name": {
                        "type": "string",
                        "nullable": true
                      },
                      "from_sender_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "company",
                          "employee",
                          "company_reply_to_employee"
                        ]
                      },
                      "default_address": {
                        "type": "string",
                        "nullable": true
                      },
                      "bcc_address": {
                        "type": "string",
                        "nullable": true,
                        "format": "email"
                      },
                      "sent_folder": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "notifications": {
                    "type": "object",
                    "properties": {
                      "uses_sounds": {
                        "type": "boolean"
                      },
                      "warn_on_document_status_change": {
                        "type": "boolean"
                      },
                      "document_status_change_types": {
                        "type": "array"
                      }
                    }
                  },
                  "privacy": {
                    "type": "object",
                    "properties": {
                      "regulation_source": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "attachment",
                          "template"
                        ]
                      },
                      "regulation_template": {
                        "type": "string",
                        "nullable": true
                      },
                      "request_letter": {
                        "type": "string",
                        "nullable": true
                      },
                      "acceptance_letter": {
                        "type": "string",
                        "nullable": true
                      },
                      "rejection_letter": {
                        "type": "string",
                        "nullable": true
                      },
                      "data_processing_question": {
                        "type": "string",
                        "nullable": true
                      },
                      "mailing_question": {
                        "type": "string",
                        "nullable": true
                      },
                      "require_regulation_on_new_entity": {
                        "type": "boolean"
                      },
                      "require_terms_acceptance": {
                        "type": "boolean"
                      },
                      "add_signature_placeholder": {
                        "type": "boolean"
                      }
                    }
                  },
                  "security": {
                    "type": "object",
                    "properties": {
                      "session_timeout": {
                        "type": "integer"
                      },
                      "skip_session_ip_validation": {
                        "type": "boolean"
                      },
                      "uses_sms_login": {
                        "type": "boolean"
                      },
                      "sms_login_cookie_duration": {
                        "type": "integer"
                      },
                      "panel_user": {
                        "type": "string",
                        "nullable": true
                      },
                      "panel_password": {
                        "type": "string",
                        "nullable": true
                      },
                      "panel_password_salt": {
                        "type": "string",
                        "nullable": true
                      },
                      "panel_uses_keyboard": {
                        "type": "boolean"
                      },
                      "panel_limit_by_ip": {
                        "type": "boolean"
                      },
                      "panel_allowed_ips": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "entities": {
                    "type": "object",
                    "properties": {
                      "auto_create": {
                        "type": "boolean"
                      },
                      "validate_postal_code": {
                        "type": "boolean"
                      },
                      "uses_interleaved": {
                        "type": "boolean"
                      },
                      "uses_customer_templates": {
                        "type": "boolean"
                      },
                      "required_fields_prospect": {
                        "type": "array"
                      },
                      "required_fields_customer": {
                        "type": "array"
                      },
                      "required_fields_supplier": {
                        "type": "array"
                      },
                      "required_fields_sales_rep": {
                        "type": "array"
                      },
                      "required_fields_customer_template": {
                        "type": "array"
                      }
                    }
                  },
                  "interface": {
                    "type": "object",
                    "properties": {
                      "max_browse_records": {
                        "type": "string",
                        "nullable": true
                      },
                      "grid_page_size": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "10",
                          "25",
                          "50",
                          "100",
                          "250",
                          "500"
                        ]
                      },
                      "shows_only_active": {
                        "type": "boolean"
                      },
                      "auto_search": {
                        "type": "boolean"
                      },
                      "replaces_decimal_point_with_comma": {
                        "type": "boolean"
                      },
                      "sort_product_search_by_stock": {
                        "type": "boolean"
                      }
                    }
                  },
                  "api": {
                    "type": "object",
                    "properties": {
                      "sales_document_validates_series": {
                        "type": "boolean"
                      },
                      "sales_document_validates_stores": {
                        "type": "boolean"
                      },
                      "sales_document_validates_advanced_management_stores": {
                        "type": "boolean"
                      },
                      "sales_document_validated_types": {
                        "type": "array"
                      },
                      "sales_document_types_excluded_from_stock_validation": {
                        "type": "array"
                      },
                      "panel_web_api_key": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hotel/parameters": {
      "get": {
        "summary": "Get Hotel Parameters grouped by topic",
        "tags": [
          "Hotel Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Hotel Parameters (partial)",
        "tags": [
          "Hotel Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billing": {
                    "type": "object",
                    "properties": {
                      "accommodation_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "accommodation_vat": {
                        "type": "string",
                        "nullable": true
                      },
                      "deposit_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "deposit_vat": {
                        "type": "string",
                        "nullable": true
                      },
                      "meal_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "meal_vat": {
                        "type": "string",
                        "nullable": true
                      },
                      "breakfast_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "lunch_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "dinner_article": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "stays": {
                    "type": "object",
                    "properties": {
                      "check_in_status": {
                        "type": "string",
                        "nullable": true
                      },
                      "check_out_status": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_bed_management": {
                        "type": "boolean"
                      }
                    }
                  },
                  "sef": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "tax_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "property_code": {
                        "type": "string",
                        "nullable": true
                      },
                      "contact": {
                        "type": "string",
                        "nullable": true
                      },
                      "email": {
                        "type": "string",
                        "nullable": true,
                        "format": "email"
                      },
                      "password": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "myallocator": {
                    "type": "object",
                    "properties": {
                      "user_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "password": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hr/absences": {
      "get": {
        "summary": "List absences",
        "description": "Returns a list of employee absences grouped by consecutive date ranges, filtered by date period and optionally by employees.",
        "tags": [
          "Human Resources",
          "Absences"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\RHumanos\\Absences\\Policies\\AbsencePolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employees_ids",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "nullable": true,
                "description": "Valid value from empreg.codempr."
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HrAbsenceOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create absence",
        "description": "Registers one employee absence on a date. Only one absence per employee and day is allowed. Day-based types take days (default 1, at most 1); hour-based types require hours (at most 24). days_food_aid=1 also discounts one food aid day when the type and the employee allow it.",
        "tags": [
          "Human Resources",
          "Absences"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\RHumanos\\Absences\\Policies\\AbsencePolicy",
          "ability": "create",
          "privileges": [
            "rhumanos:registofaltas:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "Absence date (Y-m-d)",
                    "example": "2026-09-29"
                  },
                  "employee_id": {
                    "type": "integer",
                    "description": "Active employee id",
                    "example": 8
                  },
                  "type_id": {
                    "type": "integer",
                    "description": "Absence type (remuneration) id",
                    "example": 90
                  },
                  "apply": {
                    "type": "string",
                    "enum": [
                      "same",
                      "next"
                    ],
                    "description": "Salary month the absence applies to: same or next (default same)",
                    "example": "same"
                  },
                  "days": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "maximum": 1,
                    "description": "Days for day-based types, greater than 0 and at most 1 (default 1)",
                    "example": 1
                  },
                  "hours": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "maximum": 24,
                    "description": "Hours, required for hour-based types, greater than 0 and at most 24",
                    "example": 4
                  },
                  "days_food_aid": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ],
                    "description": "Discount one food aid day (0 or 1), only for eligible type and employee",
                    "example": 0
                  }
                },
                "required": [
                  "date",
                  "employee_id",
                  "type_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AbsenceOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "The employee already has an absence on that date.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete absence",
        "description": "Deletes one absence identified by id, or by date + employee_id + type_id. Absences already processed into a salary cannot be deleted.",
        "tags": [
          "Human Resources",
          "Absences"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\RHumanos\\Absences\\Policies\\AbsencePolicy",
          "ability": "delete",
          "privileges": [
            "rhumanos:registofaltas:delete"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Absence id; when absent, date + employee_id + type_id are required",
                    "example": 1236
                  },
                  "date": {
                    "type": "string",
                    "description": "Absence date (Y-m-d)",
                    "example": "2026-09-29"
                  },
                  "employee_id": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Employee id",
                    "example": 8
                  },
                  "type_id": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Absence type (remuneration) id",
                    "example": 90
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Absence deleted.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Absence not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "Absence already processed into a salary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hr/vacations": {
      "get": {
        "summary": "List vacations",
        "description": "Returns a list of employee vacations grouped by consecutive date ranges, filtered by date period and optionally by employees.",
        "tags": [
          "Human Resources",
          "Vacations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\RHumanos\\Vacations\\Policies\\VacationPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employees_ids",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "nullable": true,
                "description": "Valid value from empreg.codempr."
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HrVacationOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Mark vacation day",
        "description": "Marks one vacation day (full or half) for an employee. Days in a closed salary month, holidays and, when the tenant only allows weekdays, weekends are refused. Marking an already marked day updates it.",
        "tags": [
          "Human Resources",
          "Vacations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\RHumanos\\Vacations\\Policies\\VacationPolicy",
          "ability": "create",
          "privileges": [
            "rhumanos:mapaferias"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "Vacation date (Y-m-d)",
                    "example": "2026-04-07"
                  },
                  "employee_id": {
                    "type": "integer",
                    "description": "Active employee id",
                    "example": 3
                  },
                  "half_day": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ],
                    "description": "1 half day, 0 full day (default 0)",
                    "example": 0
                  }
                },
                "required": [
                  "date",
                  "employee_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VacationOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "Closed salary month, holiday or weekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Unmark vacation day",
        "description": "Removes the vacation day of an employee. Days in a closed salary month cannot be removed.",
        "tags": [
          "Human Resources",
          "Vacations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\RHumanos\\Vacations\\Policies\\VacationPolicy",
          "ability": "delete",
          "privileges": [
            "rhumanos:mapaferias"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "Vacation date (Y-m-d)",
                    "example": "2026-04-07"
                  },
                  "employee_id": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Employee id",
                    "example": 3
                  }
                },
                "required": [
                  "date",
                  "employee_id"
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Vacation day removed.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "No vacation on that date.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "Closed salary month.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/hr/parameters": {
      "get": {
        "summary": "Get Human Resources parameters grouped by topic",
        "tags": [
          "Human Resources Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Human Resources parameters (partial)",
        "tags": [
          "Human Resources Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payroll": {
                    "type": "object",
                    "properties": {
                      "minimum_wage": {
                        "type": "string",
                        "nullable": true
                      },
                      "meal_allowance_half_day_absence_discount": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "full",
                          "half_day",
                          "none"
                        ]
                      },
                      "revenue_drop_percentage": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "0",
                          "25",
                          "40",
                          "60",
                          "75"
                        ]
                      }
                    }
                  },
                  "declarations": {
                    "type": "object",
                    "properties": {
                      "tax_office_code": {
                        "type": "string",
                        "nullable": true
                      },
                      "accountant_tax_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "declarant_tax_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "contribution_entity_tax_id_1": {
                        "type": "string",
                        "nullable": true
                      },
                      "contribution_entity_tax_id_2": {
                        "type": "string",
                        "nullable": true
                      },
                      "contribution_entity_tax_id_3": {
                        "type": "string",
                        "nullable": true
                      },
                      "social_security_entity_code": {
                        "type": "string",
                        "nullable": true
                      },
                      "economic_activity_code": {
                        "type": "string",
                        "nullable": true
                      },
                      "legal_nature_code": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "vacation": {
                    "type": "object",
                    "properties": {
                      "days_per_year": {
                        "type": "number"
                      },
                      "blocks_weekends": {
                        "type": "boolean"
                      }
                    }
                  },
                  "accounting": {
                    "type": "object",
                    "properties": {
                      "employees_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "governing_body_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "income_tax_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "social_security_company_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "social_security_employee_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "employee_charges_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "governing_body_charges_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "unions_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "labour_compensation_fund_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "labour_compensation_guarantee_fund_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "fund_payable_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "positive_rounding_account": {
                        "type": "string",
                        "nullable": true
                      },
                      "negative_rounding_account": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "social_security": {
                    "type": "object",
                    "properties": {
                      "employee_rate": {
                        "type": "number"
                      },
                      "employer_rate": {
                        "type": "number"
                      }
                    }
                  },
                  "attendance": {
                    "type": "object",
                    "properties": {
                      "weekly_hours": {
                        "type": "string",
                        "nullable": true
                      },
                      "work_days": {
                        "type": "integer"
                      },
                      "start_time": {
                        "type": "string",
                        "nullable": true
                      },
                      "waiting_time": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_first_check_in_last_check_out": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/mms/parameters": {
      "get": {
        "summary": "Get Maintenance Parameters grouped by topic",
        "tags": [
          "Maintenance Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Maintenance Parameters (partial)",
        "tags": [
          "Maintenance Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaults": {
                    "type": "object",
                    "properties": {
                      "manpower_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "normal_priority": {
                        "type": "string",
                        "nullable": true
                      },
                      "panel_future_days": {
                        "type": "integer"
                      }
                    }
                  },
                  "numbering": {
                    "type": "object",
                    "properties": {
                      "work_order_format": {
                        "type": "string",
                        "nullable": true
                      },
                      "equipment_code_format": {
                        "type": "string",
                        "nullable": true
                      },
                      "location_code_format": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "states": {
                    "type": "object",
                    "properties": {
                      "work_created": {
                        "type": "string",
                        "nullable": true
                      },
                      "damages_created": {
                        "type": "string",
                        "nullable": true
                      },
                      "work_listed": {
                        "type": "string",
                        "nullable": true
                      },
                      "work_in_progress": {
                        "type": "string",
                        "nullable": true
                      },
                      "work_paused": {
                        "type": "string",
                        "nullable": true
                      },
                      "work_done": {
                        "type": "string",
                        "nullable": true
                      },
                      "work_closed": {
                        "type": "string",
                        "nullable": true
                      },
                      "work_canceled": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/marketplaces/parameters": {
      "get": {
        "summary": "Get Marketplaces Parameters grouped by topic",
        "tags": [
          "Marketplaces Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Marketplaces Parameters (partial)",
        "tags": [
          "Marketplaces Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "standvirtual_credentials": {
                    "type": "object",
                    "properties": {
                      "username": {
                        "type": "string",
                        "nullable": true
                      },
                      "password": {
                        "type": "string",
                        "nullable": true
                      },
                      "secret_key": {
                        "type": "string",
                        "nullable": true
                      },
                      "client_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "user_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "contact_person": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "standvirtual_publishing": {
                    "type": "object",
                    "properties": {
                      "send_price_by_default": {
                        "type": "boolean"
                      },
                      "allow_send_by_default": {
                        "type": "boolean"
                      },
                      "under_budget_by_default": {
                        "type": "boolean"
                      },
                      "allow_vehicles_in_park": {
                        "type": "boolean"
                      },
                      "only_vehicles_with_image": {
                        "type": "boolean"
                      }
                    }
                  },
                  "standvirtual_parts": {
                    "type": "object",
                    "properties": {
                      "parts_title_template": {
                        "type": "string",
                        "nullable": true
                      },
                      "parts_description_template": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/payments/parameters": {
      "get": {
        "summary": "Get Payments Parameters grouped by topic",
        "tags": [
          "Payments Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Payments Parameters (partial)",
        "tags": [
          "Payments Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "multibanco_reference": {
                    "type": "object",
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "provider": {
                        "type": "string",
                        "nullable": true
                      },
                      "payment_method": {
                        "type": "string",
                        "nullable": true
                      },
                      "receipt_type": {
                        "type": "string",
                        "nullable": true
                      },
                      "document_types": {
                        "type": "array"
                      },
                      "series": {
                        "type": "string",
                        "nullable": true
                      },
                      "employee": {
                        "type": "string",
                        "nullable": true
                      },
                      "send_email": {
                        "type": "boolean"
                      },
                      "active_for_default_customer": {
                        "type": "boolean"
                      },
                      "account": {
                        "type": "string",
                        "nullable": true
                      },
                      "bank": {
                        "type": "string",
                        "nullable": true
                      },
                      "ifthenpay_entity": {
                        "type": "string",
                        "nullable": true
                      },
                      "ifthenpay_subentity": {
                        "type": "string",
                        "nullable": true
                      },
                      "ifthenpay_callback_key": {
                        "type": "string",
                        "nullable": true
                      },
                      "easypay_entity": {
                        "type": "string",
                        "nullable": true
                      },
                      "easypay_user_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "easypay_cin": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "mbway": {
                    "type": "object",
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "merchant_pos_id": {
                        "type": "string",
                        "nullable": true
                      },
                      "account": {
                        "type": "string",
                        "nullable": true
                      },
                      "bank": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "sepa": {
                    "type": "object",
                    "properties": {
                      "payment_method": {
                        "type": "string",
                        "nullable": true
                      },
                      "receipt_employee": {
                        "type": "string",
                        "nullable": true
                      },
                      "send_email": {
                        "type": "boolean"
                      },
                      "report_recipients": {
                        "type": "array"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/pwm/parameters": {
      "get": {
        "summary": "Get Project Work Parameters grouped by topic",
        "tags": [
          "Project Work Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Project Work Parameters (partial)",
        "tags": [
          "Project Work Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule": {
                    "type": "object",
                    "properties": {
                      "day_start_time": {
                        "type": "string",
                        "nullable": true
                      },
                      "day_end_time": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "processes": {
                    "type": "object",
                    "properties": {
                      "process_mask": {
                        "type": "string",
                        "nullable": true
                      },
                      "import_sheet_number": {
                        "type": "string",
                        "nullable": true
                      },
                      "import_start_line": {
                        "type": "integer"
                      },
                      "article_auto_measurement": {
                        "type": "string",
                        "nullable": true
                      },
                      "equipment_date_overlap_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "employee_date_overlap_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "creates_cost_center": {
                        "type": "boolean"
                      }
                    }
                  },
                  "closing": {
                    "type": "object",
                    "properties": {
                      "raw_material_documents": {
                        "type": "array"
                      },
                      "other_cost_documents": {
                        "type": "array"
                      }
                    }
                  },
                  "types": {
                    "type": "object",
                    "properties": {
                      "article_types": {
                        "type": "string",
                        "nullable": true
                      },
                      "equipment_types": {
                        "type": "string",
                        "nullable": true
                      },
                      "manpower_service_types": {
                        "type": "string",
                        "nullable": true
                      },
                      "task_types": {
                        "type": "string",
                        "nullable": true
                      },
                      "other_types": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/prospects/{prospect}/addresses": {
      "get": {
        "summary": "List prospect addresses",
        "description": "Returns all addresses for a specific prospect. Supports filtering, sorting and pagination.",
        "tags": [
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "view",
          "privileges": [
            "entidades:prospect"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Filter by address description",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "Filter by city",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postal_code",
            "in": "query",
            "required": false,
            "description": "Filter by postal code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "description": "Filter by country code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "description": "Filter by phone number",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "query",
            "required": false,
            "description": "Filter by contact",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort field (prefix with - for DESC)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[address][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[address][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[city][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct, sw, ew. Example: filter[city][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[postal_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, sw. Example: filter[postal_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[phone][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[phone][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[contact][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[contact][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: greater_than_equal_to, less_than_equal_to. Example: filter[created_at][greater_than_equal_to]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: greater_than_equal_to, less_than_equal_to. Example: filter[updated_at][greater_than_equal_to]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters: filter[field][operator]=value",
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProspectAddressOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create prospect address",
        "description": "Creates a new address for a specific prospect.",
        "tags": [
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "update",
          "privileges": [
            "entidades:prospect:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "description": "Address description/label.",
                    "example": "Sede"
                  },
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "description": "Street address.",
                    "example": "Rua do Teste, 456"
                  },
                  "city": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "description": "City / locality.",
                    "example": "Porto"
                  },
                  "postal_code": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 30,
                    "description": "Postal/ZIP code.",
                    "example": "4000-001"
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 2,
                    "maxLength": 3,
                    "description": "ISO country code (2-3 characters). Defaults to prospect country if empty.",
                    "example": "PT"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Phone number.",
                    "example": "222345678"
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Fax number.",
                    "example": "222345679"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "contact": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Contact person ID.",
                    "example": 1
                  }
                },
                "required": [
                  "description",
                  "address",
                  "city",
                  "postal_code"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProspectAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/prospects/{prospect}/extra-fields": {
      "get": {
        "summary": "List prospect extra fields",
        "description": "Returns all extra fields (Campos Extra) configured for the prospect. Requires CamposExtra module.",
        "tags": [
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "view",
          "privileges": [
            "entidades:prospect"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExtraFieldOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/prospects/{prospect}/addresses/{address}": {
      "get": {
        "summary": "Show prospect address",
        "description": "Returns a single address for a specific prospect.",
        "tags": [
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "view",
          "privileges": [
            "entidades:prospect"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProspectAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update prospect address",
        "description": "Updates fields of a specific prospect address. All fields are optional.",
        "tags": [
          "Prospects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Prospects\\Policies\\ProspectPolicy",
          "ability": "update",
          "privileges": [
            "entidades:prospect:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "prospect",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "description": "Address description/label.",
                    "example": "Sede"
                  },
                  "address": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "description": "Street address.",
                    "example": "Rua do Teste, 456"
                  },
                  "city": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "description": "City / locality.",
                    "example": "Porto"
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Postal/ZIP code.",
                    "example": "4000-001"
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "minLength": 2,
                    "maxLength": 3,
                    "description": "ISO country code (2-3 characters).",
                    "example": "PT"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Phone number.",
                    "example": "222345678"
                  },
                  "fax": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Fax number.",
                    "example": "222345679"
                  },
                  "mobile_phone": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 20,
                    "description": "Mobile phone number.",
                    "example": "912345678"
                  },
                  "contact": {
                    "type": "integer",
                    "nullable": true,
                    "description": "Contact person ID.",
                    "example": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProspectAddressOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/drafts": {
      "post": {
        "summary": "List draft types",
        "description": "Returns the available purchase draft document types configured for API use.",
        "tags": [
          "Purchases",
          "Drafts"
        ],
        "x-permissions": {
          "ability": "viewAny",
          "privileges": [
            "compras"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/drafts/{type}": {
      "post": {
        "summary": "Create purchase draft",
        "description": "Creates a new purchase draft of the specified type with supplier, header data, and line items.",
        "tags": [
          "Purchases",
          "Drafts"
        ],
        "x-permissions": {
          "ability": "create",
          "privileges": [
            "compras:{type}:new"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idsupplier": {
                    "type": "number"
                  },
                  "lines": {
                    "type": "string"
                  },
                  "number_on_supplier": {
                    "type": "string"
                  },
                  "serie": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "discount": {
                    "type": "number"
                  },
                  "discount2": {
                    "type": "number"
                  },
                  "paymentmethod": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "deliverymode": {
                    "type": "string"
                  },
                  "observations": {
                    "type": "string"
                  },
                  "vehicle": {
                    "type": "string"
                  }
                },
                "required": [
                  "idsupplier",
                  "lines"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchaseDraftOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/documents/{document_type}": {
      "post": {
        "summary": "Create purchase document",
        "description": "Creates a new purchase document of the specified type with header data and line items.",
        "tags": [
          "Purchases",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Policies\\DocumentPolicy",
          "ability": "create",
          "privileges": [
            "compras",
            "compras:{type}:new"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "document_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idcustomer": {
                    "type": "integer",
                    "description": "Supplier ID."
                  },
                  "numberonsupplier": {
                    "type": "string",
                    "nullable": true,
                    "description": "Document number on supplier side."
                  },
                  "date": {
                    "type": "string"
                  },
                  "discount": {
                    "type": "number",
                    "nullable": true,
                    "description": "Global discount percentage."
                  },
                  "discount2": {
                    "type": "number",
                    "nullable": true,
                    "description": "Second global discount percentage."
                  },
                  "paymentmethod": {
                    "type": "string",
                    "description": "Payment method code."
                  },
                  "currency": {
                    "type": "string",
                    "description": "Currency code."
                  },
                  "observations": {
                    "type": "string",
                    "nullable": true,
                    "description": "Document observations."
                  },
                  "campaigncode": {
                    "type": "string",
                    "nullable": true,
                    "description": "Campaign code."
                  },
                  "businessopportunity": {
                    "type": "string",
                    "nullable": true,
                    "description": "Business opportunity code."
                  },
                  "teccom_status": {
                    "type": "string",
                    "nullable": true,
                    "enum": [
                      "0",
                      "1"
                    ],
                    "description": "Teccom integration status."
                  },
                  "relation": {
                    "type": "string",
                    "nullable": true,
                    "description": "Related document reference."
                  },
                  "address_invoice_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Invoice address ID."
                  },
                  "address_delivery_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Delivery address ID."
                  },
                  "address_ent_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Web/PrestaSync delivery address code (CodMoradaWeb_c)."
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "idarticle": {
                          "type": "string",
                          "description": "Article code."
                        },
                        "quantity": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Line quantity."
                        },
                        "sellingprice": {
                          "type": "number",
                          "nullable": true,
                          "minimum": 0,
                          "description": "Unit price. Required except for the generic '.' article."
                        },
                        "discount": {
                          "type": "number",
                          "nullable": true,
                          "description": "Line discount percentage."
                        },
                        "discount2": {
                          "type": "number",
                          "nullable": true,
                          "description": "Second line discount percentage."
                        },
                        "vatid": {
                          "type": "string",
                          "description": "VAT code. Defaults to the article VAT code."
                        },
                        "re": {
                          "type": "string",
                          "description": "VAT exemption reason code."
                        },
                        "serialnumbers": {
                          "type": "array",
                          "description": "Required when the article has serial number control. One entry per unit of quantity."
                        },
                        "lote": {
                          "type": "string",
                          "description": "Required when the article has lot control."
                        }
                      },
                      "required": [
                        "idarticle",
                        "quantity"
                      ]
                    },
                    "description": "Document lines."
                  },
                  "lines.*.idarticle": {
                    "type": "string",
                    "description": "Article code."
                  },
                  "lines.*.quantity": {
                    "type": "number",
                    "description": "Line quantity."
                  },
                  "lines.*.sellingprice": {
                    "type": "number",
                    "description": "Unit price. Required except for the generic '.' article."
                  },
                  "lines.*.discount": {
                    "type": "number",
                    "description": "Line discount percentage."
                  },
                  "lines.*.discount2": {
                    "type": "number",
                    "description": "Second line discount percentage."
                  },
                  "lines.*.vatid": {
                    "type": "string",
                    "description": "VAT code. Defaults to the article VAT code."
                  },
                  "lines.*.re": {
                    "type": "string",
                    "description": "VAT exemption reason code."
                  },
                  "lines.*.serialnumbers": {
                    "type": "array",
                    "description": "Required when the article has serial number control. One entry per unit of quantity."
                  },
                  "lines.*.lote": {
                    "type": "string",
                    "description": "Required when the article has lot control."
                  }
                },
                "required": [
                  "idcustomer",
                  "lines",
                  "lines.*.idarticle",
                  "lines.*.quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreatePurchaseDocumentDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Missing compras or compras:{type}:new privilege, or required module inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Document type is not creatable via API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "numberonsupplier already exists for this supplier.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Invalid payload or business rule violation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/documents/{document_type}/pending-lines": {
      "post": {
        "summary": "List pending lines",
        "description": "Returns pending delivery lines for a supplier and warehouse, filtered by document type, with optional pagination and barcode filtering.",
        "tags": [
          "Purchases",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Policies\\DocumentPolicy"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "document_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idcustomer": {
                    "type": "string",
                    "description": "Valid value from forn.CodTerc."
                  },
                  "warehouse": {
                    "type": "string",
                    "description": "Valid value from lojas.codloja."
                  },
                  "page_number": {
                    "type": "integer",
                    "nullable": true
                  },
                  "page_size": {
                    "type": "integer",
                    "nullable": true
                  },
                  "article_barcode": {
                    "type": "string",
                    "nullable": true
                  },
                  "start_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date"
                  },
                  "end_date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date"
                  }
                },
                "required": [
                  "idcustomer",
                  "warehouse"
                ]
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/documents/{document_type}/{id}/close-lines": {
      "post": {
        "summary": "Close document lines",
        "description": "Marks lines of a supplier order (EF) as fully delivered, like the close-line check in the document grid. Partial quantities are not supported. Eligible lines are closed and the others are returned with the rejection reason.",
        "tags": [
          "Purchases",
          "Documents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Purchases\\Policies\\DocumentPolicy",
          "ability": "closeLines",
          "privileges": [
            "compras",
            "compras:{type}:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "document_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "exclusiveMinimum": true
                    },
                    "description": "Positive integer line numbers (NLinha) to mark as fully delivered."
                  }
                },
                "required": [
                  "lines"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClosePurchaseDocumentLinesDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Missing compras or compras:{type}:edit privilege.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Purchase document type or document not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Invalid payload, document type without line closing, or cancelled document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/purchases/parameters": {
      "get": {
        "summary": "Get Purchases parameters grouped by topic",
        "tags": [
          "Purchases Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Purchases parameters (partial)",
        "tags": [
          "Purchases Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "documents": {
                    "type": "object",
                    "properties": {
                      "line_columns": {
                        "type": "array"
                      },
                      "required_line_fields": {
                        "type": "array"
                      },
                      "activate_subsequent_stock_movement": {
                        "type": "boolean"
                      },
                      "uses_self_billing": {
                        "type": "boolean"
                      },
                      "associate_article_code_to_supplier": {
                        "type": "boolean"
                      }
                    }
                  },
                  "articles": {
                    "type": "object",
                    "properties": {
                      "auto_update_selling_price": {
                        "type": "boolean"
                      },
                      "auto_update_selling_price_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "all",
                          "standard",
                          "service"
                        ]
                      },
                      "zero_discount_margin_percentage": {
                        "type": "integer"
                      },
                      "find_complementary_articles": {
                        "type": "boolean"
                      },
                      "include_supplier_codes_in_search": {
                        "type": "boolean"
                      }
                    }
                  },
                  "pricing": {
                    "type": "object",
                    "properties": {
                      "supplier_suggested_price_source": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "last_purchase_price",
                          "agreed_price",
                          "cost_price"
                        ]
                      },
                      "autofill_last_discount": {
                        "type": "boolean"
                      },
                      "cost_price_equals_last_cost": {
                        "type": "boolean"
                      }
                    }
                  },
                  "costs": {
                    "type": "object",
                    "properties": {
                      "uses_cost_allocation": {
                        "type": "boolean"
                      },
                      "uses_customs_cost_allocation": {
                        "type": "boolean"
                      },
                      "customs_duties_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "customs_fees_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "customs_remainder_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "shipping_article": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "currency": {
                    "type": "object",
                    "properties": {
                      "uses_exchange_differences": {
                        "type": "boolean"
                      },
                      "exchange_difference_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "bank_operation",
                          "document_value"
                        ]
                      },
                      "favorable_exchange_entry_type": {
                        "type": "string",
                        "nullable": true
                      },
                      "unfavorable_exchange_entry_type": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "warnings": {
                    "type": "object",
                    "properties": {
                      "supplier_minimum_quantity_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "supplier_bundle_quantity_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "zero_unit_price_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "alert_on_price_change": {
                        "type": "boolean"
                      }
                    }
                  },
                  "suppliers": {
                    "type": "object",
                    "properties": {
                      "final_consumer_suppliers": {
                        "type": "array"
                      },
                      "restrict_to_authorized": {
                        "type": "boolean"
                      }
                    }
                  },
                  "notifications": {
                    "type": "object",
                    "properties": {
                      "email_document_types": {
                        "type": "array"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/rwm/processes": {
      "get": {
        "summary": "List processes",
        "description": "Paginated list of return and warranty processes. Customer and supplier processes share one resource; the caller only sees the entity types their privileges allow. Without the rwm:processes:clientes:nolimitseriefact privilege, customer processes whose origin document belongs to a series outside the caller's allowed series are left out.",
        "tags": [
          "RWM",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Rwm\\Policies\\Api\\ProcessPolicy",
          "ability": "viewAny",
          "privileges": [
            "rwm:processes:clientes:view",
            "rwm:processes:fornecedores:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "description": "C for customer processes, F for supplier processes.",
            "example": "C",
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "C",
                "F"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "R for return, W for warranty.",
            "example": "W",
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "R",
                "W"
              ]
            }
          },
          {
            "name": "status_id",
            "in": "query",
            "required": false,
            "description": "Process status identifier.",
            "example": 43,
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "description": "Article code, exact or partial.",
            "example": "GDB1330",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "plate",
            "in": "query",
            "required": false,
            "description": "Vehicle plate, exact or partial.",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "Creation channel: user or api.",
            "example": "user",
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "api"
              ]
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "description": "Registration date, Y-m-d. Supports eq, gte and lte.",
            "example": "2026-06-25",
            "deprecated": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[entity_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[entity_type][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "C",
                "F"
              ]
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[type][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "R",
                "W"
              ]
            }
          },
          {
            "name": "filter[status_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[status_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[supplier_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[supplier_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[reference][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw. Example: filter[reference][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[plate][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, like, sw. Example: filter[plate][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[reason_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[reason_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[origin][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[origin][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "api"
              ]
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[created_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, gte, lte. Example: filter[updated_at][eq]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProcessOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create process",
        "description": "Creates a return (R) or warranty (W) process for a customer or a supplier. The initial status comes from the rwm_status row flagged as initial for that entity type.",
        "tags": [
          "RWM",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Rwm\\Policies\\Api\\ProcessPolicy",
          "ability": "create",
          "privileges": [
            "rwm:processes:clientes:new",
            "rwm:processes:fornecedores:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "C",
                      "F"
                    ],
                    "description": "C creates a customer process, F a supplier process.",
                    "example": "C"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "R",
                      "W"
                    ],
                    "description": "R for return, W for warranty.",
                    "example": "W"
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Article code.",
                    "example": "GDB1330"
                  },
                  "reference_nc": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 63,
                    "description": "Credit note reference.",
                    "example": "NC-2026-42"
                  },
                  "document_type": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 7,
                    "description": "Source document type (tipoop).",
                    "example": "FR"
                  },
                  "document_number": {
                    "type": "number",
                    "nullable": true,
                    "description": "Source document number.",
                    "example": 66600682
                  },
                  "document_line": {
                    "type": "number",
                    "nullable": true,
                    "description": "Source document line number.",
                    "example": 1
                  },
                  "quantity": {
                    "type": "number",
                    "nullable": true,
                    "description": "Required when entity_type is C. Optional for F; omitted quantity becomes 1.",
                    "example": 2
                  },
                  "selling_price": {
                    "type": "number",
                    "nullable": true,
                    "description": "Required when entity_type is F. A zero or empty price can use the source document line price.",
                    "example": 24.16
                  },
                  "customer_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Required when entity_type is C. Must be omitted or empty when entity_type is F.",
                    "example": 7
                  },
                  "supplier_id": {
                    "type": "number",
                    "nullable": true,
                    "description": "Required when entity_type is F. Must be omitted or empty when entity_type is C.",
                    "example": 220020
                  },
                  "reason_id": {
                    "type": "number",
                    "description": "Required when type is R.",
                    "example": 4
                  },
                  "installation_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Required when type is W. Format Y-m-d.",
                    "example": "2026-01-15"
                  },
                  "fault_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Required when type is W. Format Y-m-d.",
                    "example": "2026-06-01"
                  },
                  "damage": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Required when type is W."
                  },
                  "plate": {
                    "type": "string",
                    "maxLength": 15,
                    "nullable": true,
                    "description": "Optional when type is W. Vehicle plate; the VIN is not resolved for API-created processes."
                  },
                  "kms_traveled": {
                    "type": "number",
                    "nullable": true,
                    "description": "Optional when type is W. Distance traveled since installation; non-positive values are stored as null.",
                    "example": 1250
                  },
                  "kms_current": {
                    "type": "number",
                    "nullable": true,
                    "description": "Optional when type is W. Current vehicle mileage; non-positive values are stored as null.",
                    "example": 85000
                  },
                  "observations": {
                    "type": "string",
                    "nullable": true,
                    "description": "Optional when type is W. Additional warranty observations."
                  }
                },
                "required": [
                  "entity_type",
                  "type",
                  "reference"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "409": {
            "description": "No initial status configured for the entity type, or the insert failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Invalid payload, or a customer origin document outside the caller's allowed invoice series.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/rwm/processes/{process}": {
      "get": {
        "summary": "Show process",
        "description": "Returns one process by identifier. A customer process outside the caller's allowed invoice series answers 404, like a missing one.",
        "tags": [
          "RWM",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Rwm\\Policies\\Api\\ProcessPolicy",
          "ability": "view",
          "privileges": [
            "rwm:processes:clientes:view",
            "rwm:processes:fornecedores:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Process not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Update process",
        "description": "Updates the credit note reference. It is the only field the process screen leaves editable; status changes and attachments are not part of this endpoint.",
        "tags": [
          "RWM",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Rwm\\Policies\\Api\\ProcessPolicy",
          "ability": "update",
          "privileges": [
            "rwm:processes:clientes:edit",
            "rwm:processes:fornecedores:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_nc": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 63,
                    "description": "Credit note reference.",
                    "example": "NC 2026/114"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Process not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update process",
        "description": "Updates the credit note reference. It is the only field the process screen leaves editable; status changes and attachments are not part of this endpoint.",
        "tags": [
          "RWM",
          "Processes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Rwm\\Policies\\Api\\ProcessPolicy",
          "ability": "update",
          "privileges": [
            "rwm:processes:clientes:edit",
            "rwm:processes:fornecedores:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "process",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference_nc": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 63,
                    "description": "Credit note reference.",
                    "example": "NC 2026/114"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "404": {
            "description": "Process not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/retail/parameters": {
      "get": {
        "summary": "Get Retail Parameters grouped by topic",
        "tags": [
          "Retail Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Retail Parameters (partial)",
        "tags": [
          "Retail Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pos": {
                    "type": "object",
                    "properties": {
                      "uses_employee_management": {
                        "type": "boolean"
                      },
                      "asks_for_employee": {
                        "type": "boolean"
                      },
                      "uses_tables": {
                        "type": "boolean"
                      },
                      "shows_change_panel": {
                        "type": "boolean"
                      },
                      "uses_printer": {
                        "type": "boolean"
                      },
                      "menu_url": {
                        "type": "string",
                        "nullable": true
                      },
                      "uses_customer_display": {
                        "type": "boolean"
                      },
                      "shows_articles_on_display": {
                        "type": "boolean"
                      },
                      "prints_accounting_receipt": {
                        "type": "boolean"
                      }
                    }
                  },
                  "retail": {
                    "type": "object",
                    "properties": {
                      "asks_for_employee": {
                        "type": "boolean"
                      },
                      "uses_on_screen_keyboard": {
                        "type": "boolean"
                      },
                      "shows_quick_article": {
                        "type": "boolean"
                      },
                      "shows_change_panel": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/general-documents/detailed": {
      "get": {
        "summary": "General documents: detailed report",
        "description": "Detailed report: the documents of the period, in groups when group_by is set.\n\nPages count documents, not groups: a group split across two pages carries continues_on_next_page=true and repeats its code, label and totals on the next page. Inside a group the documents follow date and number.\nThe period covers at most 366 days.\n\nExample: GET /v2/sales/reports/general-documents/detailed?group_by=customer&start_date=2026-09-01&end_date=2026-09-30\n\nSame data as the Geral Documentos report screen and its PDF, as JSON.\n\nDefaults:\n- start_date and end_date: the current month.\n- preset: sales (all = every non-receipt type; sales = types that update the current account; receipts = receipt types). document_types[] replaces the preset.\n- filter_by: customer. The customer lists (customers, customer_classifications, business_areas, zones, customer_managers, activity_sectors) only apply with filter_by=customer, employees only with filter_by=employee, salespersons only with filter_by=salesperson.\n- canceled: exclude. limit: 50, at most 250 (a higher value is cut to the maximum). page: 1.\n- order: code ASC for groups, date ASC for the lines of an ungrouped detailed report.\n\nList filters (repeat the parameter, e.g. customers[]=1&customers[]=2): customers, customer_classifications, business_areas (needs the CRM module), zones, customer_managers, activity_sectors, employees, salespersons, articles, families, subfamilies, sub_subfamilies, brands, series, stations, status, cancellation_reasons (needs canceled=all or only).\n\nOrder keys:\n- groups: code, label, total_without_vat, vat_value, total, document_count.\n- lines of an ungrouped detailed report: date, document_number, document_type, customer_code, total_without_vat, vat_value, total.\n\nRefused with 422 (the parameters are validated one by one in the schema; these combinations are checked by the server):\n- group_by=none (or no group_by) in the summary and in the daily report, whatever the preset;\n- group_by=salesperson with R or NL document types;\n- group_by=customer_classification without filter_by=customer;\n- receipt and non-receipt document types together, or non-receipt types with preset=receipts;\n- a filter whose module or company parameter is inactive;\n- an order key outside the list for the chosen grouping.\n\nAmounts carry the document sign (credit notes and RE receipts are negative). With receipts only, total_without_vat and vat_value are null. data.totals always covers the whole filtered set, not just the page.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Vendas\\Policies\\Reports\\GeneralDocumentsPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "preset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "sales",
                "receipts"
              ]
            }
          },
          {
            "name": "filter_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "employee",
                "salesperson"
              ]
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "customer",
                "document",
                "employee",
                "salesperson",
                "series",
                "zone",
                "customer_classification"
              ]
            }
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "exclude",
                "only"
              ]
            }
          },
          {
            "name": "advances",
            "in": "query",
            "required": false,
            "description": "Advance documents: all, exclude or only. Needs the UsaAdiantamentos company parameter set to S; sent without it, 422.",
            "example": "exclude",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "exclude",
                "only"
              ]
            }
          },
          {
            "name": "exclude_settled_advances",
            "in": "query",
            "required": false,
            "description": "With advances=only, leaves out the advances already settled by credit notes. Needs UsaAdiantamentos=S; sent without advances=only, 422.",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "attachments",
            "in": "query",
            "required": false,
            "description": "Documents with or without attachments. Needs the ATTACHMENTS module; sent without it, 422.",
            "example": "with",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "with",
                "without"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "code",
                "label",
                "total_without_vat",
                "vat_value",
                "total",
                "document_count",
                "date",
                "document_number",
                "document_type",
                "customer_code"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "document_types",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customers",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customer_classifications",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "business_areas",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "zones",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customer_managers",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "activity_sectors",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "employees",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "salespersons",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "articles",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "families",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "subfamilies",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sub_subfamilies",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "brands",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "series",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "stations",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "cancellation_reasons",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Documents of the page in their groups, with the totals of the whole set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "report_type": {
                          "type": "string",
                          "enum": [
                            "detailed"
                          ],
                          "description": "Report type."
                        },
                        "group_by": {
                          "type": "string",
                          "enum": [
                            "none",
                            "customer",
                            "document",
                            "employee",
                            "salesperson",
                            "series",
                            "zone",
                            "customer_classification"
                          ],
                          "description": "Grouping applied."
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "start_date": {
                              "type": "string",
                              "format": "date",
                              "description": "First day of the report."
                            },
                            "end_date": {
                              "type": "string",
                              "format": "date",
                              "description": "Last day of the report."
                            }
                          },
                          "required": [
                            "start_date",
                            "end_date"
                          ]
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "Order key applied."
                            },
                            "direction": {
                              "type": "string",
                              "enum": [
                                "ASC",
                                "DESC"
                              ],
                              "description": "Order direction applied."
                            }
                          },
                          "required": [
                            "key",
                            "direction"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "description": "Groups of the documents on this page. With group_by=none there is one group with null code and label.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "nullable": true,
                                "description": "Code of the group in its native type: integer for customer, employee, salesperson and series; text for document type, zone and customer classification. Null for documents without one and when group_by=none.",
                                "oneOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "label": {
                                "type": "string",
                                "nullable": true,
                                "description": "Name of the group, or the \"not assigned\" text when the code is null. Null when group_by=none."
                              },
                              "extra": {
                                "type": "object",
                                "nullable": true,
                                "description": "Extra data of the group: the customer tax_id when group_by=customer, null otherwise.",
                                "properties": {
                                  "tax_id": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Customer tax number."
                                  }
                                }
                              },
                              "document_count": {
                                "type": "integer",
                                "description": "Documents of the whole group, on every page."
                              },
                              "totals": {
                                "type": "object",
                                "properties": {
                                  "total_without_vat": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                                  },
                                  "vat_value": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                                  },
                                  "total": {
                                    "type": "number",
                                    "description": "Gross amount, signed, rounded per document."
                                  },
                                  "document_count": {
                                    "type": "integer",
                                    "description": "Number of documents."
                                  }
                                },
                                "required": [
                                  "total_without_vat",
                                  "vat_value",
                                  "total",
                                  "document_count"
                                ]
                              },
                              "continues_on_next_page": {
                                "type": "boolean",
                                "description": "True when the next page carries more documents of this group."
                              },
                              "lines": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "document_type": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "description": "Code."
                                        },
                                        "label": {
                                          "type": "string",
                                          "nullable": true,
                                          "description": "Name."
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "label"
                                      ]
                                    },
                                    "document_number": {
                                      "type": "string",
                                      "description": "Document number as printed (DocumentNumber, or the internal number when empty)."
                                    },
                                    "series": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "integer",
                                          "nullable": true,
                                          "description": "Series number."
                                        },
                                        "label": {
                                          "type": "string",
                                          "nullable": true,
                                          "description": "Series description."
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "label"
                                      ]
                                    },
                                    "date": {
                                      "type": "string",
                                      "format": "date",
                                      "description": "Document date, Y-m-d."
                                    },
                                    "customer": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "integer",
                                          "nullable": true,
                                          "description": "Customer code."
                                        },
                                        "name": {
                                          "type": "string",
                                          "nullable": true,
                                          "description": "Customer name."
                                        },
                                        "tax_id": {
                                          "type": "string",
                                          "nullable": true,
                                          "description": "Customer tax number."
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "name",
                                        "tax_id"
                                      ]
                                    },
                                    "journal": {
                                      "type": "object",
                                      "nullable": true,
                                      "description": "Accounting entry of the document. Null without the CONTABILIDADE module or when the document has none.",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "description": "Journal code."
                                        },
                                        "number": {
                                          "type": "integer",
                                          "description": "Entry number in the journal."
                                        }
                                      }
                                    },
                                    "total_without_vat": {
                                      "type": "number",
                                      "nullable": true,
                                      "description": "Net amount, signed; 0 for a cancelled document. Null with receipts only."
                                    },
                                    "vat_value": {
                                      "type": "number",
                                      "nullable": true,
                                      "description": "VAT amount, signed; 0 for a cancelled document. Null with receipts only."
                                    },
                                    "total": {
                                      "type": "number",
                                      "description": "Gross amount, signed; 0 for a cancelled document."
                                    }
                                  },
                                  "required": [
                                    "document_type",
                                    "document_number",
                                    "series",
                                    "date",
                                    "customer",
                                    "journal",
                                    "total_without_vat",
                                    "vat_value",
                                    "total"
                                  ]
                                },
                                "description": "Documents of the group on this page, by date and number."
                              }
                            },
                            "required": [
                              "code",
                              "label",
                              "extra",
                              "document_count",
                              "totals",
                              "continues_on_next_page",
                              "lines"
                            ]
                          }
                        },
                        "totals": {
                          "type": "object",
                          "properties": {
                            "total_without_vat": {
                              "type": "number",
                              "nullable": true,
                              "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                            },
                            "vat_value": {
                              "type": "number",
                              "nullable": true,
                              "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                            },
                            "total": {
                              "type": "number",
                              "description": "Gross amount, signed, rounded per document."
                            },
                            "document_count": {
                              "type": "integer",
                              "description": "Number of documents."
                            }
                          },
                          "required": [
                            "total_without_vat",
                            "vat_value",
                            "total",
                            "document_count"
                          ]
                        }
                      },
                      "required": [
                        "report_type",
                        "group_by",
                        "period",
                        "order",
                        "groups",
                        "totals"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "per_page": {
                          "type": "integer",
                          "description": "Page size applied."
                        },
                        "current_page": {
                          "type": "integer",
                          "description": "Page returned."
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "Whether a next page exists."
                        }
                      },
                      "required": [
                        "per_page",
                        "current_page",
                        "has_more"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/general-documents/summary": {
      "get": {
        "summary": "General documents: summary report",
        "description": "Summary report: one row of totals per group of the chosen grouping, over the documents that are not cancelled. group_by is required, as on the screen. Pages count groups.\n\nExample: GET /v2/sales/reports/general-documents/summary?group_by=customer&start_date=2026-09-01&end_date=2026-09-30&order=total_without_vat&sorder=DESC&limit=5\n\nSame data as the Geral Documentos report screen and its PDF, as JSON.\n\nDefaults:\n- start_date and end_date: the current month.\n- preset: sales (all = every non-receipt type; sales = types that update the current account; receipts = receipt types). document_types[] replaces the preset.\n- filter_by: customer. The customer lists (customers, customer_classifications, business_areas, zones, customer_managers, activity_sectors) only apply with filter_by=customer, employees only with filter_by=employee, salespersons only with filter_by=salesperson.\n- canceled: exclude. limit: 50, at most 250 (a higher value is cut to the maximum). page: 1.\n- order: code ASC for groups, date ASC for the lines of an ungrouped detailed report.\n\nList filters (repeat the parameter, e.g. customers[]=1&customers[]=2): customers, customer_classifications, business_areas (needs the CRM module), zones, customer_managers, activity_sectors, employees, salespersons, articles, families, subfamilies, sub_subfamilies, brands, series, stations, status, cancellation_reasons (needs canceled=all or only).\n\nOrder keys:\n- groups: code, label, total_without_vat, vat_value, total, document_count.\n- lines of an ungrouped detailed report: date, document_number, document_type, customer_code, total_without_vat, vat_value, total.\n\nRefused with 422 (the parameters are validated one by one in the schema; these combinations are checked by the server):\n- group_by=none (or no group_by) in the summary and in the daily report, whatever the preset;\n- group_by=salesperson with R or NL document types;\n- group_by=customer_classification without filter_by=customer;\n- receipt and non-receipt document types together, or non-receipt types with preset=receipts;\n- a filter whose module or company parameter is inactive;\n- an order key outside the list for the chosen grouping.\n\nAmounts carry the document sign (credit notes and RE receipts are negative). With receipts only, total_without_vat and vat_value are null. data.totals always covers the whole filtered set, not just the page.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Vendas\\Policies\\Reports\\GeneralDocumentsPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "preset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "sales",
                "receipts"
              ]
            }
          },
          {
            "name": "filter_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "employee",
                "salesperson"
              ]
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "document",
                "employee",
                "salesperson",
                "series",
                "zone",
                "customer_classification"
              ]
            }
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "exclude",
                "only"
              ]
            }
          },
          {
            "name": "advances",
            "in": "query",
            "required": false,
            "description": "Advance documents: all, exclude or only. Needs the UsaAdiantamentos company parameter set to S; sent without it, 422.",
            "example": "exclude",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "exclude",
                "only"
              ]
            }
          },
          {
            "name": "exclude_settled_advances",
            "in": "query",
            "required": false,
            "description": "With advances=only, leaves out the advances already settled by credit notes. Needs UsaAdiantamentos=S; sent without advances=only, 422.",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "attachments",
            "in": "query",
            "required": false,
            "description": "Documents with or without attachments. Needs the ATTACHMENTS module; sent without it, 422.",
            "example": "with",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "with",
                "without"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "code",
                "label",
                "total_without_vat",
                "vat_value",
                "total",
                "document_count"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "document_types",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customers",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customer_classifications",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "business_areas",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "zones",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customer_managers",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "activity_sectors",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "employees",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "salespersons",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "articles",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "families",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "subfamilies",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sub_subfamilies",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "brands",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "series",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "stations",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "cancellation_reasons",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Totals per group on the page, with the totals of the whole set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "report_type": {
                          "type": "string",
                          "enum": [
                            "summary"
                          ],
                          "description": "Report type."
                        },
                        "group_by": {
                          "type": "string",
                          "enum": [
                            "customer",
                            "document",
                            "employee",
                            "salesperson",
                            "series",
                            "zone",
                            "customer_classification"
                          ],
                          "description": "Grouping applied; the summary always has one."
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "start_date": {
                              "type": "string",
                              "format": "date",
                              "description": "First day of the report."
                            },
                            "end_date": {
                              "type": "string",
                              "format": "date",
                              "description": "Last day of the report."
                            }
                          },
                          "required": [
                            "start_date",
                            "end_date"
                          ]
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "Order key applied."
                            },
                            "direction": {
                              "type": "string",
                              "enum": [
                                "ASC",
                                "DESC"
                              ],
                              "description": "Order direction applied."
                            }
                          },
                          "required": [
                            "key",
                            "direction"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "description": "Groups on this page.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "nullable": true,
                                "description": "Code of the group in its native type: integer for customer, employee, salesperson and series; text for document type, zone and customer classification. Null for documents without one and when group_by=none.",
                                "oneOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "label": {
                                "type": "string",
                                "nullable": true,
                                "description": "Name of the group, or the \"not assigned\" text when the code is null. Null when group_by=none."
                              },
                              "extra": {
                                "type": "object",
                                "nullable": true,
                                "description": "Extra data of the group: the customer tax_id when group_by=customer, null otherwise.",
                                "properties": {
                                  "tax_id": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Customer tax number."
                                  }
                                }
                              },
                              "totals": {
                                "type": "object",
                                "properties": {
                                  "total_without_vat": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                                  },
                                  "vat_value": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                                  },
                                  "total": {
                                    "type": "number",
                                    "description": "Gross amount, signed, rounded per document."
                                  },
                                  "document_count": {
                                    "type": "integer",
                                    "description": "Number of documents."
                                  }
                                },
                                "required": [
                                  "total_without_vat",
                                  "vat_value",
                                  "total",
                                  "document_count"
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "label",
                              "extra",
                              "totals"
                            ]
                          }
                        },
                        "totals": {
                          "type": "object",
                          "properties": {
                            "total_without_vat": {
                              "type": "number",
                              "nullable": true,
                              "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                            },
                            "vat_value": {
                              "type": "number",
                              "nullable": true,
                              "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                            },
                            "total": {
                              "type": "number",
                              "description": "Gross amount, signed, rounded per document."
                            },
                            "document_count": {
                              "type": "integer",
                              "description": "Number of documents."
                            }
                          },
                          "required": [
                            "total_without_vat",
                            "vat_value",
                            "total",
                            "document_count"
                          ]
                        }
                      },
                      "required": [
                        "report_type",
                        "group_by",
                        "period",
                        "order",
                        "groups",
                        "totals"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "per_page": {
                          "type": "integer",
                          "description": "Page size applied."
                        },
                        "current_page": {
                          "type": "integer",
                          "description": "Page returned."
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "Whether a next page exists."
                        }
                      },
                      "required": [
                        "per_page",
                        "current_page",
                        "has_more"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/reports/general-documents/by-period": {
      "get": {
        "summary": "General documents: report by month or day",
        "description": "Totals per group and per month (granularity=month) or per day (granularity=day), over the documents that are not cancelled. Pages count groups.\n\ndata.periods lists every period of the range (\"2026-01\" or \"2026-09-16\"); data.groups[].periods only carries the periods with documents. data.year_totals is only sent with granularity=month.\ngranularity=day needs a grouping and covers at most 15 days.\nWithout a grouping vat_value is null where the screen report has no VAT column.\n\nExample: GET /v2/sales/reports/general-documents/by-period?granularity=month&group_by=customer&start_date=2026-01-01&end_date=2026-12-31\n\nSame data as the Geral Documentos report screen and its PDF, as JSON.\n\nDefaults:\n- start_date and end_date: the current month.\n- preset: sales (all = every non-receipt type; sales = types that update the current account; receipts = receipt types). document_types[] replaces the preset.\n- filter_by: customer. The customer lists (customers, customer_classifications, business_areas, zones, customer_managers, activity_sectors) only apply with filter_by=customer, employees only with filter_by=employee, salespersons only with filter_by=salesperson.\n- canceled: exclude. limit: 50, at most 250 (a higher value is cut to the maximum). page: 1.\n- order: code ASC for groups, date ASC for the lines of an ungrouped detailed report.\n\nList filters (repeat the parameter, e.g. customers[]=1&customers[]=2): customers, customer_classifications, business_areas (needs the CRM module), zones, customer_managers, activity_sectors, employees, salespersons, articles, families, subfamilies, sub_subfamilies, brands, series, stations, status, cancellation_reasons (needs canceled=all or only).\n\nOrder keys:\n- groups: code, label, total_without_vat, vat_value, total, document_count.\n- lines of an ungrouped detailed report: date, document_number, document_type, customer_code, total_without_vat, vat_value, total.\n\nRefused with 422 (the parameters are validated one by one in the schema; these combinations are checked by the server):\n- group_by=none (or no group_by) in the summary and in the daily report, whatever the preset;\n- group_by=salesperson with R or NL document types;\n- group_by=customer_classification without filter_by=customer;\n- receipt and non-receipt document types together, or non-receipt types with preset=receipts;\n- a filter whose module or company parameter is inactive;\n- an order key outside the list for the chosen grouping.\n\nAmounts carry the document sign (credit notes and RE receipts are negative). With receipts only, total_without_vat and vat_value are null. data.totals always covers the whole filtered set, not just the page.",
        "tags": [
          "Sales",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Vendas\\Policies\\Reports\\GeneralDocumentsPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "granularity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "month",
                "day"
              ]
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "preset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "sales",
                "receipts"
              ]
            }
          },
          {
            "name": "filter_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "employee",
                "salesperson"
              ]
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "customer",
                "document",
                "employee",
                "salesperson",
                "series",
                "zone",
                "customer_classification"
              ]
            }
          },
          {
            "name": "canceled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "exclude",
                "only"
              ]
            }
          },
          {
            "name": "advances",
            "in": "query",
            "required": false,
            "description": "Advance documents: all, exclude or only. Needs the UsaAdiantamentos company parameter set to S; sent without it, 422.",
            "example": "exclude",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "exclude",
                "only"
              ]
            }
          },
          {
            "name": "exclude_settled_advances",
            "in": "query",
            "required": false,
            "description": "With advances=only, leaves out the advances already settled by credit notes. Needs UsaAdiantamentos=S; sent without advances=only, 422.",
            "example": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "attachments",
            "in": "query",
            "required": false,
            "description": "Documents with or without attachments. Needs the ATTACHMENTS module; sent without it, 422.",
            "example": "with",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "with",
                "without"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "code",
                "label",
                "total_without_vat",
                "vat_value",
                "total",
                "document_count"
              ]
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "document_types",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customers",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customer_classifications",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "business_areas",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "zones",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "customer_managers",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "activity_sectors",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "employees",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "salespersons",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "articles",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "families",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "subfamilies",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sub_subfamilies",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "brands",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "series",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "stations",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "cancellation_reasons",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Totals per group and period on the page, with the totals per period, per year and of the whole set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "report_type": {
                          "type": "string",
                          "enum": [
                            "monthly",
                            "daily"
                          ],
                          "description": "monthly with granularity=month, daily with granularity=day."
                        },
                        "group_by": {
                          "type": "string",
                          "enum": [
                            "none",
                            "customer",
                            "document",
                            "employee",
                            "salesperson",
                            "series",
                            "zone",
                            "customer_classification"
                          ],
                          "description": "Grouping applied."
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "start_date": {
                              "type": "string",
                              "format": "date",
                              "description": "First day of the report."
                            },
                            "end_date": {
                              "type": "string",
                              "format": "date",
                              "description": "Last day of the report."
                            }
                          },
                          "required": [
                            "start_date",
                            "end_date"
                          ]
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "Order key applied."
                            },
                            "direction": {
                              "type": "string",
                              "enum": [
                                "ASC",
                                "DESC"
                              ],
                              "description": "Order direction applied."
                            }
                          },
                          "required": [
                            "key",
                            "direction"
                          ]
                        },
                        "periods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Every period of the range: \"2026-01\" by month, \"2026-09-16\" by day."
                        },
                        "groups": {
                          "type": "array",
                          "description": "Groups on this page. With group_by=none there is one group with null code and label.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "nullable": true,
                                "description": "Code of the group in its native type: integer for customer, employee, salesperson and series; text for document type, zone and customer classification. Null for documents without one and when group_by=none.",
                                "oneOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ]
                              },
                              "label": {
                                "type": "string",
                                "nullable": true,
                                "description": "Name of the group, or the \"not assigned\" text when the code is null. Null when group_by=none."
                              },
                              "extra": {
                                "type": "object",
                                "nullable": true,
                                "description": "Extra data of the group: the customer tax_id when group_by=customer, null otherwise.",
                                "properties": {
                                  "tax_id": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Customer tax number."
                                  }
                                }
                              },
                              "totals": {
                                "type": "object",
                                "properties": {
                                  "total_without_vat": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                                  },
                                  "vat_value": {
                                    "type": "number",
                                    "nullable": true,
                                    "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                                  },
                                  "total": {
                                    "type": "number",
                                    "description": "Gross amount, signed, rounded per document."
                                  },
                                  "document_count": {
                                    "type": "integer",
                                    "description": "Number of documents."
                                  }
                                },
                                "required": [
                                  "total_without_vat",
                                  "vat_value",
                                  "total",
                                  "document_count"
                                ]
                              },
                              "periods": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "total_without_vat": {
                                      "type": "number",
                                      "nullable": true,
                                      "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                                    },
                                    "vat_value": {
                                      "type": "number",
                                      "nullable": true,
                                      "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                                    },
                                    "total": {
                                      "type": "number",
                                      "description": "Gross amount, signed, rounded per document."
                                    },
                                    "document_count": {
                                      "type": "integer",
                                      "description": "Number of documents."
                                    }
                                  },
                                  "required": [
                                    "total_without_vat",
                                    "vat_value",
                                    "total",
                                    "document_count"
                                  ]
                                },
                                "description": "Totals by period, only for the periods with documents of the group."
                              }
                            },
                            "required": [
                              "code",
                              "label",
                              "extra",
                              "totals",
                              "periods"
                            ]
                          }
                        },
                        "period_totals": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "total_without_vat": {
                                "type": "number",
                                "nullable": true,
                                "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                              },
                              "vat_value": {
                                "type": "number",
                                "nullable": true,
                                "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                              },
                              "total": {
                                "type": "number",
                                "description": "Gross amount, signed, rounded per document."
                              },
                              "document_count": {
                                "type": "integer",
                                "description": "Number of documents."
                              }
                            },
                            "required": [
                              "total_without_vat",
                              "vat_value",
                              "total",
                              "document_count"
                            ]
                          },
                          "description": "Totals of every period of the range over all groups."
                        },
                        "year_totals": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "total_without_vat": {
                                "type": "number",
                                "nullable": true,
                                "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                              },
                              "vat_value": {
                                "type": "number",
                                "nullable": true,
                                "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                              },
                              "total": {
                                "type": "number",
                                "description": "Gross amount, signed, rounded per document."
                              },
                              "document_count": {
                                "type": "integer",
                                "description": "Number of documents."
                              }
                            },
                            "required": [
                              "total_without_vat",
                              "vat_value",
                              "total",
                              "document_count"
                            ]
                          },
                          "description": "Totals by year over all groups. Only with granularity=month."
                        },
                        "totals": {
                          "type": "object",
                          "properties": {
                            "total_without_vat": {
                              "type": "number",
                              "nullable": true,
                              "description": "Net amount, signed (credit notes and RE receipts negative). Null when the report has receipts only."
                            },
                            "vat_value": {
                              "type": "number",
                              "nullable": true,
                              "description": "VAT amount, signed. Null when the report has receipts only, and in the two period reports without a grouping whose screen version has no VAT column."
                            },
                            "total": {
                              "type": "number",
                              "description": "Gross amount, signed, rounded per document."
                            },
                            "document_count": {
                              "type": "integer",
                              "description": "Number of documents."
                            }
                          },
                          "required": [
                            "total_without_vat",
                            "vat_value",
                            "total",
                            "document_count"
                          ]
                        }
                      },
                      "required": [
                        "report_type",
                        "group_by",
                        "period",
                        "order",
                        "periods",
                        "groups",
                        "period_totals",
                        "totals"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "per_page": {
                          "type": "integer",
                          "description": "Page size applied."
                        },
                        "current_page": {
                          "type": "integer",
                          "description": "Page returned."
                        },
                        "has_more": {
                          "type": "boolean",
                          "description": "Whether a next page exists."
                        }
                      },
                      "required": [
                        "per_page",
                        "current_page",
                        "has_more"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/sales/parameters": {
      "get": {
        "summary": "Get Sales parameters grouped by topic",
        "tags": [
          "Sales Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Sales parameters (partial)",
        "tags": [
          "Sales Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "documents": {
                    "type": "object",
                    "properties": {
                      "line_columns": {
                        "type": "array"
                      },
                      "default_seller_source": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "customer",
                          "employee"
                        ]
                      },
                      "shipping_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "max_days_to_cancel": {
                        "type": "integer"
                      },
                      "quote_validity_days": {
                        "type": "integer"
                      },
                      "require_credit_note_reason": {
                        "type": "boolean"
                      },
                      "uses_fuel_sales": {
                        "type": "boolean"
                      },
                      "separate_lines_by_origin_document": {
                        "type": "boolean"
                      },
                      "required_line_fields": {
                        "type": "array"
                      },
                      "auto_copy_commercial_info": {
                        "type": "boolean"
                      },
                      "auto_copy_observations": {
                        "type": "boolean"
                      },
                      "max_simplified_invoice_amount_taxable": {
                        "type": "integer"
                      },
                      "max_simplified_invoice_amount_non_taxable": {
                        "type": "integer"
                      },
                      "warn_on_line_delete": {
                        "type": "boolean"
                      },
                      "show_line_discount": {
                        "type": "boolean"
                      },
                      "show_unit_price_with_vat": {
                        "type": "boolean"
                      },
                      "auto_value_return": {
                        "type": "boolean"
                      },
                      "search_by_barcode": {
                        "type": "boolean"
                      }
                    }
                  },
                  "pricing": {
                    "type": "object",
                    "properties": {
                      "profit_margin_cost_basis": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "cost_price",
                          "last_cost_price",
                          "average_cost_price"
                        ]
                      },
                      "show_profit_margin_on_document": {
                        "type": "boolean"
                      },
                      "commissions_on_total_without_vat": {
                        "type": "boolean"
                      },
                      "lookup_article_price_list": {
                        "type": "boolean"
                      },
                      "lookup_customer_price_list": {
                        "type": "boolean"
                      },
                      "lookup_classification_discount_table": {
                        "type": "boolean"
                      }
                    }
                  },
                  "stock": {
                    "type": "object",
                    "properties": {
                      "show_only_batches_with_quantity": {
                        "type": "boolean"
                      },
                      "uses_temporary_batches_on_orders": {
                        "type": "boolean"
                      },
                      "allow_selling_batches_without_stock": {
                        "type": "boolean"
                      },
                      "asset_movement_warehouse": {
                        "type": "string",
                        "nullable": true
                      },
                      "delivery_note_updates_stock_value": {
                        "type": "boolean"
                      },
                      "uses_equivalent_articles": {
                        "type": "boolean"
                      }
                    }
                  },
                  "warnings": {
                    "type": "object",
                    "properties": {
                      "block_final_consumer_invoices": {
                        "type": "boolean"
                      },
                      "negative_profit_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "negative_profit_per_line_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "doubtful_customer_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "litigious_customer_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "price_list_warning_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn"
                        ]
                      },
                      "credit_limit_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "service_order_credit_limit_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "credit_limit_includes_orders": {
                        "type": "boolean"
                      },
                      "credit_limit_extra_document_types": {
                        "type": "array"
                      },
                      "negative_stock_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "minimum_stock_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "pending_documents_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "pending_documents_includes_orders": {
                        "type": "boolean"
                      },
                      "pending_control_mode": {
                        "type": "string",
                        "nullable": true
                      },
                      "ordered_articles_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "sell_below_last_cost_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "restrict_sales_to_employee_default_store": {
                        "type": "boolean"
                      },
                      "zero_unit_price_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "min_profit_margin_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "min_profit_margin_percentage": {
                        "type": "number"
                      },
                      "order_stock_warning_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      },
                      "duplicate_article_document_types": {
                        "type": "array"
                      },
                      "pending_stock_message": {
                        "type": "string",
                        "nullable": true
                      },
                      "pending_stock_document_types": {
                        "type": "array"
                      },
                      "pending_stock_origin_document_types": {
                        "type": "array"
                      }
                    }
                  },
                  "printing": {
                    "type": "object",
                    "properties": {
                      "letter_header": {
                        "type": "string",
                        "nullable": true
                      },
                      "letter_footer": {
                        "type": "string",
                        "nullable": true
                      },
                      "document_language": {
                        "type": "string",
                        "nullable": true
                      },
                      "show_original_pdf_button": {
                        "type": "boolean"
                      }
                    }
                  },
                  "shipping": {
                    "type": "object",
                    "properties": {
                      "default_method": {
                        "type": "string",
                        "nullable": true
                      },
                      "unload_time_offset_hours": {
                        "type": "integer"
                      },
                      "print_delivery_methods": {
                        "type": "boolean"
                      },
                      "vehicle_plates": {
                        "type": "array"
                      }
                    }
                  },
                  "receipts": {
                    "type": "object",
                    "properties": {
                      "withholding_percentage": {
                        "type": "number"
                      },
                      "min_withholding_amount": {
                        "type": "number"
                      },
                      "allow_over_direct_entries": {
                        "type": "boolean"
                      },
                      "list_direct_entries": {
                        "type": "boolean"
                      },
                      "uses_advances": {
                        "type": "boolean"
                      },
                      "advances_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "credit_note",
                          "document_line"
                        ]
                      }
                    }
                  },
                  "notifications": {
                    "type": "object",
                    "properties": {
                      "email_document_types": {
                        "type": "array"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/sellers/{seller}/extra-fields": {
      "get": {
        "summary": "List seller extra fields",
        "description": "Returns all extra fields (Campos Extra) configured for the seller. Requires CamposExtra module.",
        "tags": [
          "Sellers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Sellers\\Policies\\SellerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:comerciais:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "seller",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExtraFieldOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/reports/social": {
      "get": {
        "summary": "List available social reports",
        "description": "Returns the list of social reports accessible to the authenticated user, filtered by active tenant modules.",
        "tags": [
          "Social",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Social\\Reports\\Policies\\SocialReportsPolicy",
          "ability": "viewReports",
          "privileges": [
            "relatorios:social"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/reports/social/incidents": {
      "get": {
        "summary": "Incidents report",
        "description": "Returns paginated incidents from the IncidentesLares table. Requires the SOCIAL module.",
        "tags": [
          "Social",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Social\\Reports\\Policies\\SocialReportsPolicy",
          "ability": "viewIncidents",
          "privileges": [
            "relatorios:social:incidentes"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer code (codterc_c).",
            "example": 1001,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "employee_id",
            "in": "query",
            "required": false,
            "description": "Filter by responsible employee code (funcresp_c).",
            "example": 5,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "required": false,
            "description": "Incidents on or after this date (data_c >=). ISO 8601 date.",
            "example": "2024-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "required": false,
            "description": "Incidents on or before this date (data_c <=). ISO 8601 date.",
            "example": "2024-12-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "private",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SocialIncidentOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/reports/social/medicine": {
      "get": {
        "summary": "Medicine report",
        "description": "Returns paginated medication records from the Medicacao table. Requires SOCIAL or LARES module.",
        "tags": [
          "Social",
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Social\\Reports\\Policies\\SocialReportsPolicy",
          "ability": "viewMedicine",
          "privileges": [
            "relatorios:social:medicacao"
          ],
          "notes": "Requires SOCIAL or LARES module."
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "description": "Filter by customer code (codterc_c).",
            "example": 1001,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Filter by medication type (tipo).",
            "example": "MED",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "required": false,
            "description": "Medications with start date on or after this date (datainicio_c >=). ISO 8601 date.",
            "example": "2024-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "required": false,
            "description": "Medications with end date on or before this date (datafim_c <=). ISO 8601 date.",
            "example": "2024-12-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SocialMedicineOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/social/parameters": {
      "get": {
        "summary": "Get Social Parameters grouped by topic",
        "tags": [
          "Social Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Social Parameters (partial)",
        "tags": [
          "Social Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contributions": {
                    "type": "object",
                    "properties": {
                      "family_contribution_table": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/movements": {
      "get": {
        "summary": "List stock movements",
        "description": "Returns stock movements ordered by movement number ascending, paginated by cursor: follow meta.next to the last page. Supports optional filtering by movement date range, type and warehouse.",
        "tags": [
          "Stocks",
          "Movements"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Movements\\Policies\\StockMovementPolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:movstock:movimentos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor taken from meta.next or meta.previous; omit it for the first page. A cursor that was changed, or that was issued for another sort, answers 422 INVALID_CURSOR. There are no page numbers: sending page answers 422.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Field to sort by: movement_type_id, warehouse_enter_id or warehouse_exit_id, prefixed with - for descending. Ties are ordered by id in the same direction.",
            "example": "-warehouse_enter_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "movement_type_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "warehouse_enter_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "warehouse_exit_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "filter[movement_type_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by movement type code. Operators: eq. Example: filter[movement_type_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[warehouse_enter_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by entry warehouse identifier. Operators: eq. Example: filter[warehouse_enter_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[warehouse_exit_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by exit warehouse identifier. Operators: eq. Example: filter[warehouse_exit_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[start_date]",
            "in": "query",
            "required": false,
            "description": "Filter movements with date on or after this value (Y-m-d).",
            "example": "2024-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date]",
            "in": "query",
            "required": false,
            "description": "Filter movements with date on or before this value (Y-m-d).",
            "example": "2024-12-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StockMovementOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorPaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "cursor",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create stock movement",
        "description": "Creates a new stock movement (entry, exit or transfer). The required warehouses depend on the movement type base: entry (E) requires warehouse_enter_id, exit (S) requires warehouse_exit_id, transfer (T) requires both. Articles must be of type N (Normal). Lot and serial number requirements are determined by article configuration.",
        "tags": [
          "Stocks",
          "Movements"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Movements\\Policies\\StockMovementPolicy",
          "ability": "create",
          "privileges": [
            "stocks:movstock:movimentos:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "Movement description.",
                    "example": "Monthly stock entry"
                  },
                  "movement_type_id": {
                    "type": "string",
                    "description": "Movement type code.",
                    "example": "E"
                  },
                  "warehouse_enter_id": {
                    "type": "integer",
                    "description": "Entry warehouse identifier. Required when movement type base is E or T.",
                    "example": 1
                  },
                  "warehouse_exit_id": {
                    "type": "integer",
                    "description": "Exit warehouse identifier. Required when movement type base is S or T.",
                    "example": 2
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "article_id": {
                          "type": "string",
                          "description": "Article code. Article must be of type N (Normal).",
                          "example": "ART001"
                        },
                        "quantity": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "description": "Quantity to move. Must be greater than 0.",
                          "example": 10
                        },
                        "lot": {
                          "type": "string",
                          "description": "Lot code. Required when the article uses lots (delote=T).",
                          "example": "LOT2024"
                        },
                        "serial": {
                          "type": "array",
                          "description": "Serial numbers. Required when the article uses serial numbers (usanserie=T). Count must equal quantity.",
                          "example": [
                            "SN001",
                            "SN002"
                          ]
                        },
                        "cost_center": {
                          "type": "string",
                          "description": "Cost center code. Only applicable when the Accounting module is active.",
                          "example": "CC001"
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Unit value override. If omitted, the system calculates the cost price automatically.",
                          "example": 25
                        }
                      },
                      "required": [
                        "article_id",
                        "quantity"
                      ]
                    },
                    "description": "Movement article lines. At least one line is required."
                  },
                  "lines.*.article_id": {
                    "type": "string",
                    "description": "Article code. Article must be of type N (Normal).",
                    "example": "ART001"
                  },
                  "lines.*.quantity": {
                    "type": "number",
                    "description": "Quantity to move. Must be greater than 0.",
                    "example": 10
                  },
                  "lines.*.lot": {
                    "type": "string",
                    "description": "Lot code. Required when the article uses lots (delote=T).",
                    "example": "LOT2024"
                  },
                  "lines.*.serial": {
                    "type": "array",
                    "description": "Serial numbers. Required when the article uses serial numbers (usanserie=T). Count must equal quantity.",
                    "example": [
                      "SN001",
                      "SN002"
                    ]
                  },
                  "lines.*.cost_center": {
                    "type": "string",
                    "description": "Cost center code. Only applicable when the Accounting module is active.",
                    "example": "CC001"
                  },
                  "lines.*.value": {
                    "type": "number",
                    "description": "Unit value override. If omitted, the system calculates the cost price automatically.",
                    "example": 25
                  }
                },
                "required": [
                  "description",
                  "movement_type_id",
                  "lines",
                  "lines.*.article_id",
                  "lines.*.quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockMovementShowOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/recounts/{recount}/lines": {
      "post": {
        "summary": "Add or update recount lines",
        "description": "Adds or increments article lines in a recount. Supports article lookup by article_id or barcode. Lot field is required for lot-managed articles. Each line quantity is accumulated on existing entries.",
        "tags": [
          "Stocks",
          "Recounts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Recounts\\Policies\\RecountPolicy",
          "ability": "update",
          "privileges": [
            "stocks:movstock:recontagens"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "recount",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "article_id": {
                          "type": "string",
                          "description": "Article identifier. Required when barcode is not provided.",
                          "example": "ART001"
                        },
                        "barcode": {
                          "type": "string",
                          "description": "Article barcode. Used as fallback when article_id is not provided.",
                          "example": "5601234567890"
                        },
                        "quantity": {
                          "type": "number",
                          "description": "Quantity to add. Accumulated on existing entry for the same article and lot.",
                          "example": 5
                        },
                        "lot": {
                          "type": "string",
                          "description": "Lot identifier. Required for lot-managed articles.",
                          "example": "L2024001"
                        }
                      },
                      "required": [
                        "quantity"
                      ]
                    },
                    "description": "List of article lines to add or increment in the recount."
                  },
                  "lines.*.article_id": {
                    "type": "string",
                    "description": "Article identifier. Required when barcode is not provided.",
                    "example": "ART001"
                  },
                  "lines.*.barcode": {
                    "type": "string",
                    "description": "Article barcode. Used as fallback when article_id is not provided.",
                    "example": "5601234567890"
                  },
                  "lines.*.quantity": {
                    "type": "number",
                    "description": "Quantity to add. Accumulated on existing entry for the same article and lot.",
                    "example": 5
                  },
                  "lines.*.lot": {
                    "type": "string",
                    "description": "Lot identifier. Required for lot-managed articles.",
                    "example": "L2024001"
                  }
                },
                "required": [
                  "lines",
                  "lines.*.quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns lines_success (array of processed lines) and lines_error (array of objects with type and article_id) for each failed line.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Recount is not open. Lines can only be added to recounts with status A.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/movements/{stockMovement}": {
      "get": {
        "summary": "Show stock movement",
        "description": "Returns a single stock movement with all its article lines. Returns 404 when the movement identifier does not exist.",
        "tags": [
          "Stocks",
          "Movements"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Movements\\Policies\\StockMovementPolicy",
          "ability": "view",
          "privileges": [
            "stocks:movstock:movimentos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "stockMovement",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockMovementShowOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/movements-types": {
      "get": {
        "summary": "List movement types",
        "description": "Returns a paginated list of configured stock movement types. Supports optional filtering by base type (E, S or T). Returns 200 with empty data when no types match the applied filters.",
        "tags": [
          "Stocks",
          "Movements Types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\MovementsTypes\\Policies\\StockMovementTypePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:movstock:movimentos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by movement type code. Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by movement type designation (exact match). Filter by movement type designation (partial match). Operators: eq, like. Example: filter[description][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by movement base type: E (Entry), S (Exit) or T (Transfer). Operators: eq. Example: filter[type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StockMovementTypeOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/quantities": {
      "get": {
        "summary": "List stock quantities",
        "description": "Returns a paginated list of current stock quantities per article and warehouse. By default only returns entries with positive stock. Supports filtering by article code and warehouse. Returns 200 with empty data when no entries match the applied filters.",
        "tags": [
          "Stocks",
          "Quantities"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Quantities\\Policies\\StockQuantityPolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "include_zero_stock",
            "in": "query",
            "required": false,
            "description": "Include articles with zero or negative stock. Defaults to false (only positive stock is returned).",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by article code. Exclude an article code. Filter by a comma-separated list of article codes. Operators: eq, neq, in. Example: filter[article_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse identifier. Operators: eq. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StockQuantityOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/quantities/search": {
      "get": {
        "summary": "Search stock quantities aggregated per article",
        "description": "Returns stock aggregated by article with warehouses[] array. Supports Base64 text/barcode search and optional article data (price, description, barcodes[]). Differs from /quantities (per article+warehouse).",
        "tags": [
          "Stocks",
          "Quantities"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Quantities\\Policies\\StockQuantityPolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "article_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "txt",
            "in": "query",
            "required": false,
            "description": "Base64 encoded text search in article code/description.",
            "example": "QVJUMDAx",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "description": "Base64 encoded barcode lookup (resolves prefix when applicable).",
            "example": "NTYwMTIzNDU2Nzg5MA==",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "with_article_data",
            "in": "query",
            "required": false,
            "description": "Include price, description, use_lots and barcodes[] per article.",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include_zero_stock",
            "in": "query",
            "required": false,
            "description": "Include articles with zero or negative stock.",
            "example": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[article_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by article code. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[article_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter to a specific warehouse. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StockQuantitySearchOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/barcode-prefixes": {
      "get": {
        "summary": "List barcode prefixes",
        "description": "Returns a paginated list of configured barcode prefixes (cbarras). Prefixes drive the decode of variable price/quantity barcodes.",
        "tags": [
          "Stocks",
          "BarcodePrefixes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Articles\\Policies\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "P",
                "Q"
              ]
            },
            "deprecated": true
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "filter[prefix][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by exact barcode prefix. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[prefix][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[type][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by prefix type. P=price, Q=quantity. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[type][eq]=value",
            "schema": {
              "type": "string",
              "enum": [
                "P",
                "Q"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BarcodePrefixOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/recounts": {
      "get": {
        "summary": "List recounts",
        "description": "Returns a paginated list of stock recount documents ordered by identifier descending. Supports filtering by warehouse, status, date range, family, subfamily and brand.",
        "tags": [
          "Stocks",
          "Recounts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Recounts\\Policies\\RecountPolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:movstock:recontagens"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "family_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "sub_family_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "brand_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "sector_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by warehouse identifier. Operators: eq. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[status][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by status: A (open), F (closed). Operators: eq. Example: filter[status][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[family_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by article family. Operators: eq. Example: filter[family_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[sub_family_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by article subfamily. Operators: eq. Example: filter[sub_family_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[brand_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by brand code. Operators: eq. Example: filter[brand_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[sector_id][operator]",
            "in": "query",
            "required": false,
            "description": "Filter by sector identifier (SETORES module). Operators: eq. Example: filter[sector_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[start_date]",
            "in": "query",
            "required": false,
            "description": "Filter recounts with date on or after this value (Y-m-d).",
            "example": "2024-01-01",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_date]",
            "in": "query",
            "required": false,
            "description": "Filter recounts with date on or before this value (Y-m-d).",
            "example": "2024-12-31",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RecountOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/recounts/{recount}": {
      "get": {
        "summary": "Get recount",
        "description": "Returns the header and article lines of a specific stock recount.",
        "tags": [
          "Stocks",
          "Recounts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Stocks\\Recounts\\Policies\\RecountPolicy",
          "ability": "view",
          "privileges": [
            "stocks:movstock:recontagens"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "recount",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RecountShowOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/stocks/parameters": {
      "get": {
        "summary": "Get Stocks parameters grouped by topic",
        "tags": [
          "Stocks Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Stocks parameters (partial)",
        "tags": [
          "Stocks Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pricing": {
                    "type": "object",
                    "properties": {
                      "default_retail_price_field": {
                        "type": "string",
                        "nullable": true
                      },
                      "margin_calculation_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "selling_price",
                          "profit_margin",
                          "ask"
                        ]
                      },
                      "margin_calculation_base": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "cost_price",
                          "selling_price"
                        ]
                      },
                      "kit_cost_price_field": {
                        "type": "string",
                        "nullable": true
                      },
                      "profit_margin_type": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "barcodes": {
                    "type": "object",
                    "properties": {
                      "default_type": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "EAN-13",
                          "CODE128"
                        ]
                      },
                      "generate_when_missing": {
                        "type": "boolean"
                      },
                      "auto_create": {
                        "type": "boolean"
                      }
                    }
                  },
                  "families": {
                    "type": "object",
                    "properties": {
                      "allow_change": {
                        "type": "boolean"
                      },
                      "auto_fill_article": {
                        "type": "boolean"
                      },
                      "change_article_code": {
                        "type": "boolean"
                      },
                      "auto_fill_article_code": {
                        "type": "boolean"
                      },
                      "sub_family_usage": {
                        "type": "string",
                        "nullable": true
                      },
                      "sub_sub_family_usage": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "stock": {
                    "type": "object",
                    "properties": {
                      "uses_serial_numbers": {
                        "type": "boolean"
                      },
                      "control_by_document_line": {
                        "type": "boolean"
                      },
                      "uses_third_party_batches": {
                        "type": "boolean"
                      },
                      "show_location_in_movements_and_recounts": {
                        "type": "boolean"
                      },
                      "open_recounts_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "disabled",
                          "warn",
                          "block"
                        ]
                      }
                    }
                  },
                  "articles": {
                    "type": "object",
                    "properties": {
                      "uses_dimensional_spaces": {
                        "type": "boolean"
                      },
                      "uses_dimensional_spaces_legacy": {
                        "type": "boolean"
                      },
                      "auto_build_kits": {
                        "type": "boolean"
                      },
                      "uses_alternative_units": {
                        "type": "boolean"
                      },
                      "required_fields": {
                        "type": "array"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/subscriptions/parameters": {
      "get": {
        "summary": "Get Subscriptions Parameters grouped by topic",
        "tags": [
          "Subscriptions Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Subscriptions Parameters (partial)",
        "tags": [
          "Subscriptions Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoicing": {
                    "type": "object",
                    "properties": {
                      "document_type_to_generate": {
                        "type": "string",
                        "nullable": true
                      },
                      "due_days": {
                        "type": "integer"
                      },
                      "invoicing_employee": {
                        "type": "string",
                        "nullable": true
                      },
                      "setup_article": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "notifications": {
                    "type": "object",
                    "properties": {
                      "send_email": {
                        "type": "boolean"
                      },
                      "send_email_on_manual_run": {
                        "type": "boolean"
                      },
                      "report_recipients": {
                        "type": "array"
                      }
                    }
                  },
                  "suspension": {
                    "type": "object",
                    "properties": {
                      "license_suspension_alert_days": {
                        "type": "integer"
                      },
                      "auto_suspension_mode": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/entities/suppliers/{supplier}/extra-fields": {
      "get": {
        "summary": "List suppliers extra fields",
        "description": "Returns all extra fields (Campos Extra) configured for the supplier. Requires CamposExtra module.",
        "tags": [
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Entidade\\Suppliers\\Policies\\SupplierPolicy",
          "ability": "view",
          "privileges": [
            "entidades:fornecedores:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExtraFieldOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/document-series": {
      "get": {
        "summary": "List document series",
        "description": "Returns a paginated list of active document series, excluding internal ones.",
        "tags": [
          "Tables",
          "Financial",
          "Document Series"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\DocumentSeries\\Policies\\DocumentSeriePolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:series"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "series_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "series_format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "establishment_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "accessible_only",
            "in": "query",
            "required": false,
            "description": "true keeps only the series the authenticated employee may use (empreg.seriesaccesso plus their own nserie), the same set the legacy selectors offer. Omitted or false returns every active, non-internal serie",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[series_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[series_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[series_format][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[series_format][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[customer_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[customer_id][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[end_date][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[end_date][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[year][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[year][eq]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[establishment_number][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[establishment_number][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DocumentSerieOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create document serie",
        "description": "Creates a new document serie.",
        "tags": [
          "Tables",
          "Financial",
          "Document Series"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\DocumentSeries\\Policies\\DocumentSeriePolicy",
          "ability": "create",
          "privileges": [
            "tabelas:financeiros:series:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "serie": {
                    "type": "number"
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1
                  },
                  "impression_format": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "N",
                      "A"
                    ]
                  },
                  "final_customer_id": {
                    "type": "number"
                  },
                  "limit_date": {
                    "type": "string"
                  }
                },
                "required": [
                  "serie",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentSerieOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/activity-sectors": {
      "get": {
        "summary": "List activity sectors",
        "description": "Returns a paginated list of activity sectors.",
        "tags": [
          "Tables",
          "CRM",
          "Activity Sectors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Crm\\ActivitySectors\\Policies\\ActivitySectorPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:crmsfa:secactiv"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActivitySectorOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create activity sector",
        "description": "Creates a new activity sector.",
        "tags": [
          "Tables",
          "CRM",
          "Activity Sectors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Crm\\ActivitySectors\\Policies\\ActivitySectorPolicy",
          "ability": "create",
          "privileges": [
            "tabelas:crmsfa:secactiv"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "maxLength": 8,
                    "description": "Activity sector identifier (max 8 chars)"
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "Activity sector name (1-30 chars)"
                  }
                },
                "required": [
                  "id",
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ActivitySectorOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/departments": {
      "get": {
        "summary": "List departments",
        "description": "Returns a paginated list of departments.",
        "tags": [
          "Tables",
          "Organizational",
          "Departments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Organizational\\Departments\\Policies\\DepartmentPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:organizacionais:departamentos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "responsible_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "show_on_workshop_agenda",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "deprecated": true
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "exclusiveMinimum": true
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[responsible_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[responsible_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[show_on_workshop_agenda][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[show_on_workshop_agenda][eq]=value",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TablesOrganizationalDepartmentsOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/warehouses": {
      "get": {
        "summary": "List warehouses",
        "description": "Returns a paginated list of warehouses.",
        "tags": [
          "Tables",
          "Organizational",
          "Warehouses"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Organizational\\Warehouses\\Policies\\WarehousePolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:organizacionais:armazens"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_available_scheduling",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TablesOrganizationalWarehouseOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/warehouses/{warehouse}/locations": {
      "get": {
        "summary": "List warehouse locations",
        "description": "Returns locations belonging to the given warehouse.",
        "tags": [
          "Tables",
          "Organizational",
          "Locations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Organizational\\Locations\\Policies\\LocationPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:organizacionais:armazens"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TablesOrganizationalLocationOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/shipping-methods": {
      "get": {
        "summary": "List shipping methods",
        "description": "Returns a paginated list of shipping methods.",
        "tags": [
          "Tables",
          "Organizational",
          "Shipping Methods"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Organizational\\ShippingMethods\\Policies\\ShippingMethodPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:organizacionais:modosexp"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ShippingMethodOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/cashs": {
      "get": {
        "summary": "List cash registers",
        "description": "Returns a paginated list of cash registers / POS terminals.",
        "tags": [
          "Tables",
          "Organizational",
          "Cashs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Organizational\\Cashs\\Policies\\CashPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:organizacionais:postostermcaixa"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_bank_cash_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bank_atm_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_bank_atm_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id_account_bank_cash",
            "in": "query",
            "required": false,
            "description": "Deprecated (sunset 2027-02-28), use account_bank_cash_id.",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id_bank_atm",
            "in": "query",
            "required": false,
            "description": "Deprecated (sunset 2027-02-28), use bank_atm_id.",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id_account_bank_atm",
            "in": "query",
            "required": false,
            "description": "Deprecated (sunset 2027-02-28), use account_bank_atm_id.",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "bank_cash_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "id_bank_cash",
            "in": "query",
            "required": false,
            "description": "Deprecated (sunset 2027-02-28), use filter[bank_cash_id][eq].",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[bank_cash_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[bank_cash_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id_bank_cash][operator]",
            "in": "query",
            "required": false,
            "description": "Deprecated (sunset 2027-02-28), use filter[bank_cash_id][operator]. Operators: eq. Example: filter[id_bank_cash][eq]=value",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CashOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/sectors": {
      "get": {
        "summary": "List warehouse sectors",
        "description": "Returns a paginated list of warehouse sectors. Requires SETORES module.",
        "tags": [
          "Tables",
          "Organizational",
          "Sectors"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Organizational\\Sectors\\Policies\\SectorPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:organizacionais:setores"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[barcode][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, ct. Example: filter[barcode][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_active][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[is_active][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[warehouse_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[warehouse_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SectorOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/vats": {
      "get": {
        "summary": "List VAT rates",
        "description": "Returns a paginated list of VAT rates with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Financial",
          "VAT Rates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\Vats\\Policies\\VatPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:iva"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "tax_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "saft_tax_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[tax_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[tax_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[saft_tax_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[saft_tax_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VatOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/vats/{id}": {
      "get": {
        "summary": "Show VAT rate",
        "description": "Returns a single VAT rate by its identifier.",
        "tags": [
          "Tables",
          "Financial",
          "VAT Rates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\Vats\\Policies\\VatPolicy",
          "ability": "view",
          "privileges": [
            "tabelas:financeiros:iva"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VatOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/exemption-reasons": {
      "get": {
        "summary": "List exemption reasons",
        "description": "Returns a paginated list of VAT exemption reasons with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Financial",
          "Exemption Reasons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\ExemptionReasons\\Policies\\ExemptionReasonPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:razoesisencaoiva"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "saft_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[saft_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[saft_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExemptionReasonOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/exemption-reasons/{id}": {
      "get": {
        "summary": "Show exemption reason",
        "description": "Returns a single VAT exemption reason by its identifier.",
        "tags": [
          "Tables",
          "Financial",
          "Exemption Reasons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\ExemptionReasons\\Policies\\ExemptionReasonPolicy",
          "ability": "view",
          "privileges": [
            "tabelas:financeiros:razoesisencaoiva"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExemptionReasonOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/payment-methods": {
      "get": {
        "summary": "List payment methods",
        "description": "Returns a paginated list of payment methods (terms/due dates) with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Financial",
          "Payment Methods"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\PaymentMethods\\Policies\\PaymentMethodPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:formapag"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "payment_term_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[days][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[days][gte]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[payment_term_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[payment_term_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentMethodOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/payment-methods/{id}": {
      "get": {
        "summary": "Show payment method",
        "description": "Returns a single payment method by its identifier.",
        "tags": [
          "Tables",
          "Financial",
          "Payment Methods"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\PaymentMethods\\Policies\\PaymentMethodPolicy",
          "ability": "view",
          "privileges": [
            "tabelas:financeiros:formapag"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaymentMethodOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/payment-modes": {
      "get": {
        "summary": "List payment modes",
        "description": "Returns a paginated list of payment modes (e.g. cash, cheque, transfer) with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Financial",
          "Payment Modes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\PaymentModes\\Policies\\PaymentModePolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:modopag"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_active_tpv",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentModeOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/payment-modes/{id}": {
      "get": {
        "summary": "Show payment mode",
        "description": "Returns a single payment mode by its identifier.",
        "tags": [
          "Tables",
          "Financial",
          "Payment Modes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\PaymentModes\\Policies\\PaymentModePolicy",
          "ability": "view",
          "privileges": [
            "tabelas:financeiros:modopag"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaymentModeOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/banks": {
      "get": {
        "summary": "List banks",
        "description": "Returns a paginated list of banks with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Financial",
          "Banks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\Banks\\Policies\\BankPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:bancos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "swift_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[swift_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[swift_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/banks/{id}": {
      "get": {
        "summary": "Show bank",
        "description": "Returns a single bank by its identifier.",
        "tags": [
          "Tables",
          "Financial",
          "Banks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\Banks\\Policies\\BankPolicy",
          "ability": "view",
          "privileges": [
            "tabelas:financeiros:bancos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BankOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/bank-accounts": {
      "get": {
        "summary": "List bank accounts",
        "description": "Returns a paginated list of company bank accounts with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Financial",
          "Bank Accounts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\BankAccounts\\Policies\\BankAccountPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:contas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "bank_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_cash_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_atm_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_transfer_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankAccountOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/bank-accounts/{id}": {
      "get": {
        "summary": "Show bank account",
        "description": "Returns a single company bank account by its identifier.",
        "tags": [
          "Tables",
          "Financial",
          "Bank Accounts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\BankAccounts\\Policies\\BankAccountPolicy",
          "ability": "view",
          "privileges": [
            "tabelas:financeiros:contas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BankAccountOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/document-reasons": {
      "get": {
        "summary": "List document reasons",
        "description": "Returns a paginated list of document reasons for cancellations and credit notes.",
        "tags": [
          "Tables",
          "Financial",
          "Document Reasons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\DocumentReasons\\Policies\\DocumentReasonPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:financeiros:motivosdocs"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_credit_note",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_cancellation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[reason][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[reason][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DocumentReasonOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/document-reasons/{id}": {
      "get": {
        "summary": "Show document reason",
        "description": "Returns a single document reason by its identifier.",
        "tags": [
          "Tables",
          "Financial",
          "Document Reasons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\DocumentReasons\\Policies\\DocumentReasonPolicy",
          "ability": "view",
          "privileges": [
            "tabelas:financeiros:motivosdocs"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentReasonOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/document-types": {
      "get": {
        "summary": "List document types",
        "description": "Returns a paginated list of document type configurations visible in the API.",
        "tags": [
          "Tables",
          "Financial",
          "Document Types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\DocumentTypes\\Policies\\DocumentTypePolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "abbreviation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "is_purchase",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "saft_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "is_receipt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, sw, ct. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[abbreviation][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, sw, ct. Example: filter[abbreviation][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_purchase][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[is_purchase][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[saft_type][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[saft_type][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[is_receipt][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[is_receipt][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DocumentTypeOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/document-statuses": {
      "get": {
        "summary": "List document statuses",
        "description": "Returns the statuses a document type can hold, the vocabulary behind every legacy status selector. Codes come from the configured transitions, descriptions and badge styles from the states table, already in the tenant language. A status no transition reaches is flagged is_initial: for Orcamento that is ABR, which the legacy selector used to prepend by hand. The response is a closed vocabulary of a few dozen entries and is not paginated.",
        "tags": [
          "Tables",
          "Financial",
          "Document Statuses"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\DocumentStatuses\\Policies\\DocumentStatusPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "description": "Physical name of the document type, as stored in TransEstados. Orcamento is the one the workshop board budget selector uses. Omitted returns the statuses of every document type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DocumentStatusOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/countries": {
      "get": {
        "summary": "List countries",
        "description": "Returns a paginated list of countries with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Geographical",
          "Countries"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Geographical\\Countries\\Policies\\CountryPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:geograficas:paises"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "currency_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "saft_country_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, neq, in, nin. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: ct, sw, ew, eq. Example: filter[name][ct]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[currency_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[currency_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[saft_country_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[saft_country_id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TablesGeographicalCountryOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/districts": {
      "get": {
        "summary": "List districts",
        "description": "Returns a paginated list of districts with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Geographical",
          "Districts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Geographical\\Districts\\Policies\\DistrictPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:geograficas:distritos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by district ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by district name",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_code",
            "in": "query",
            "required": false,
            "description": "Filter by ISO country code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "province_code",
            "in": "query",
            "required": false,
            "description": "Filter by province code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: ct, sw, ew, eq. Example: filter[name][ct]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[country_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[country_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[province_code][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq. Example: filter[province_code][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TablesGeographicalDistrictOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/counties": {
      "get": {
        "summary": "List counties",
        "description": "Returns a paginated list of counties with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Geographical",
          "Counties"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Geographical\\Counties\\Policies\\CountyPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:geograficas:concelhos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by county ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by county name",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "district_id",
            "in": "query",
            "required": false,
            "description": "Filter by parent district ID",
            "deprecated": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: ct, sw, ew, eq. Example: filter[name][ct]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[district_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[district_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CountyOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/zones": {
      "get": {
        "summary": "List zones",
        "description": "Returns a paginated list of geographical zones with optional filtering and sorting.",
        "tags": [
          "Tables",
          "Geographical",
          "Zones"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Geographical\\Zones\\Policies\\ZonePolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:geograficas:zonas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sorder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by zone code",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Filter by zone name",
            "deprecated": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in, nin. Example: filter[id][eq]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: ct, sw, ew, eq. Example: filter[name][ct]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ZoneOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/classifications": {
      "get": {
        "summary": "List classifications",
        "description": "Returns a paginated list of entity classifications.",
        "tags": [
          "Tables",
          "CRM",
          "Classifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Crm\\Classifications\\Policies\\ClassificationPolicy",
          "ability": "viewAny",
          "privileges": [
            "tabelas:crmsfa:classif"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClassificationOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/service-order-classifications": {
      "get": {
        "summary": "List service order classifications",
        "description": "Returns the list of OSV classifications (ordemservico_classificacao).",
        "tags": [
          "Tables",
          "Workshop",
          "Service Order Classifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Workshop\\ServiceOrderClassifications\\Policies\\ServiceOrderClassificationPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:apoio:classificacao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TablesWorkshopServiceOrderClassificationOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/time-intervals": {
      "get": {
        "summary": "List time intervals",
        "description": "Returns the relative date windows the legacy date filters offer, already resolved to real dates for the moment of the request. The table stores a strtotime expression and a date format per bound, which only mean a window together: current month is the expression today with the formats Y-m-01 and Y-m-t. Resolving it here keeps a stored filter that names a window answering the same question every day, without any consumer reimplementing strtotime. A bound the row leaves open comes back null instead of the epoch. Names are in the language of the request. The response is a closed vocabulary of a few entries and is not paginated.",
        "tags": [
          "Tables",
          "Time Intervals"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\TimeIntervals\\Policies\\TimeIntervalPolicy",
          "ability": "viewAny"
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TimeIntervalOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "x-pagination": "none",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tables/document-series/{id}": {
      "patch": {
        "summary": "Update document serie",
        "description": "Updates an existing document serie.",
        "tags": [
          "Tables",
          "Financial",
          "Document Series"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Tables\\Financial\\DocumentSeries\\Policies\\DocumentSeriePolicy",
          "ability": "update",
          "privileges": [
            "tabelas:financeiros:series:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 1
                  },
                  "impression_format": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "N",
                      "A"
                    ]
                  },
                  "final_customer_id": {
                    "type": "number"
                  },
                  "limit_date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentSerieOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/tickets/parameters": {
      "get": {
        "summary": "Get Tickets Parameters grouped by topic",
        "tags": [
          "Tickets Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Tickets Parameters (partial)",
        "tags": [
          "Tickets Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaults": {
                    "type": "object",
                    "properties": {
                      "default_status": {
                        "type": "string",
                        "nullable": true
                      },
                      "default_priority": {
                        "type": "string",
                        "nullable": true
                      },
                      "default_tag_format": {
                        "type": "string",
                        "nullable": true
                      },
                      "full_administrator_access_mode": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          "full_access",
                          "by_department"
                        ]
                      }
                    }
                  },
                  "fields": {
                    "type": "object",
                    "properties": {
                      "required_fields": {
                        "type": "array"
                      },
                      "message_history_enabled": {
                        "type": "boolean"
                      }
                    }
                  },
                  "public": {
                    "type": "object",
                    "properties": {
                      "public_url": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "subscriptions": {
                    "type": "object",
                    "properties": {
                      "subscription_required": {
                        "type": "boolean"
                      },
                      "auto_subscription": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/verticals/parameters": {
      "get": {
        "summary": "Get Verticals Parameters grouped by topic",
        "tags": [
          "Verticals Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Verticals Parameters (partial)",
        "tags": [
          "Verticals Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rentacar": {
                    "type": "object",
                    "properties": {
                      "delivery_checklist": {
                        "type": "string",
                        "nullable": true
                      },
                      "pickup_checklist": {
                        "type": "string",
                        "nullable": true
                      },
                      "contract_label": {
                        "type": "string",
                        "nullable": true
                      },
                      "rental_conditions": {
                        "type": "string",
                        "nullable": true
                      },
                      "contract_header_first_page": {
                        "type": "string",
                        "nullable": true
                      },
                      "contract_header_other_pages": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "loyalty": {
                    "type": "object",
                    "properties": {
                      "points_conversion": {
                        "type": "integer"
                      },
                      "discount_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "default_points_yes": {
                        "type": "integer"
                      },
                      "default_points_no": {
                        "type": "integer"
                      },
                      "default_discount_yes": {
                        "type": "integer"
                      },
                      "default_discount_no": {
                        "type": "integer"
                      },
                      "card_letter_text": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "condominiums": {
                    "type": "object",
                    "properties": {
                      "article": {
                        "type": "string",
                        "nullable": true
                      },
                      "paid_item": {
                        "type": "string",
                        "nullable": true
                      },
                      "common_fund_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "common_fund_paid_item": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "external_saft": {
                    "type": "object",
                    "properties": {
                      "generic_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "generic_service_article": {
                        "type": "string",
                        "nullable": true
                      },
                      "payment_method": {
                        "type": "string",
                        "nullable": true
                      },
                      "cash_register": {
                        "type": "string",
                        "nullable": true
                      },
                      "bank_account": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wms/parameters": {
      "get": {
        "summary": "Get WMS Parameters grouped by topic",
        "tags": [
          "WMS Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "viewAny",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Parameters grouped by topic.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update WMS Parameters (partial)",
        "tags": [
          "WMS Parameters"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Settings\\Parameters\\Policies\\ParameterPolicy",
          "ability": "update",
          "privileges": [
            "configuracoes:parametros"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_status": {
                    "type": "object",
                    "properties": {
                      "default": {
                        "type": "string",
                        "nullable": true
                      },
                      "incoming": {
                        "type": "string",
                        "nullable": true
                      },
                      "reposition": {
                        "type": "string",
                        "nullable": true
                      },
                      "recount": {
                        "type": "string",
                        "nullable": true
                      },
                      "packing": {
                        "type": "string",
                        "nullable": true
                      },
                      "shipping": {
                        "type": "string",
                        "nullable": true
                      },
                      "finish": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  },
                  "logistics": {
                    "type": "object",
                    "properties": {
                      "minimum_area": {
                        "type": "number"
                      },
                      "minimum_volume": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reloaded state after the partial update.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "description": "Topic name to its parameters.",
                      "additionalProperties": {
                        "type": "object",
                        "description": "Parameter name to its value.",
                        "additionalProperties": {
                          "nullable": true,
                          "description": "Decoded value. Parameters with a closed set of choices travel as English names (for example disabled, warn, block) and are stored in the legacy tokens. Secrets are served as the ******** placeholder when set.",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              }
                            },
                            {
                              "type": "object",
                              "additionalProperties": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/processes/status/store-entry": {
      "post": {
        "summary": "Store status entry",
        "description": "Creates a new document status log entry and updates the document status. Accepts type, warehouse code, order line, status, date, quantities, and optional location info.",
        "tags": [
          "WMSO",
          "Processes"
        ],
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "warehouse_code": {
                    "type": "number"
                  },
                  "order_line": {
                    "type": "string",
                    "nullable": true
                  },
                  "status": {
                    "type": "string",
                    "nullable": true
                  },
                  "date": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time"
                  },
                  "quantity": {
                    "type": "number"
                  },
                  "quantity_missing": {
                    "type": "number",
                    "nullable": true
                  },
                  "extra_info_locations": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "type",
                  "warehouse_code",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success message confirming the status entry was stored",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/stocks": {
      "post": {
        "summary": "Update stock",
        "description": "Creates or updates a WMSO stock record for a given article, warehouse and location. Uses upsert logic to set WMS quantity and reserved quantity.",
        "tags": [
          "WMSO",
          "Stocks"
        ],
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "article": {
                    "type": "string"
                  },
                  "warehouse": {
                    "type": "string"
                  },
                  "location": {
                    "type": "string"
                  },
                  "wms_qty": {
                    "type": "integer"
                  },
                  "wms_qty_reserved": {
                    "type": "integer"
                  }
                },
                "required": [
                  "article",
                  "warehouse",
                  "location",
                  "wms_qty",
                  "wms_qty_reserved"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stock updated successfully",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/documents": {
      "post": {
        "summary": "List guide process documents",
        "description": "Returns process guide documents with their lines. Accepts POST with filter criteria for document lookup.",
        "tags": [
          "WMSO",
          "Documents"
        ],
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProcessGuideDocumentOutputDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/articles": {
      "get": {
        "summary": "List articles",
        "description": "Returns articles ordered by code, each with the same fields as the article detail: extra barcodes, stock quantity, family and brand. The optional warehouse_id selects the warehouse used for the ABC class and the stock limits.",
        "tags": [
          "WMSO",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Wmso\\Policies\\API\\Articles\\ArticlePolicy",
          "ability": "viewAny",
          "privileges": [
            "stocks:artigos:list"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of articles with barcodes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/articles/{article}": {
      "get": {
        "summary": "Get article",
        "description": "Returns a single article by its code or base64-encoded identifier, including associated barcodes and stock data.",
        "tags": [
          "WMSO",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Wmso\\Policies\\API\\Articles\\ArticlePolicy",
          "ability": "view",
          "privileges": [
            "stocks:artigos:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "article",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Article detail with barcodes",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/articles/{barcode}/barcode": {
      "get": {
        "summary": "Get article by barcode",
        "description": "Looks up an article by its barcode (base64-encoded). Searches the barcodes table exclusively, ignoring article code matches.",
        "tags": [
          "WMSO",
          "Articles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Wmso\\Policies\\API\\Articles\\ArticlePolicy",
          "ability": "view",
          "privileges": [
            "stocks:artigos:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "barcode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Article detail matched by barcode",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/customers/{customer}": {
      "get": {
        "summary": "Get customer",
        "description": "Returns customer details by composite identifier (code.addressId). Includes name, NIF, contacts (email, mobile, phone), address, coordinates, and WMSO-specific fields like store code and route label.",
        "tags": [
          "WMSO",
          "Customers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Wmso\\Policies\\API\\Entities\\CustomerPolicy",
          "ability": "view",
          "privileges": [
            "entidades:clientes:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Customer detail with address and contacts",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/customer-types": {
      "get": {
        "summary": "List customer types",
        "description": "Returns every WMSO customer type with its id and description, used by the WMS to mirror its entity types support table.",
        "tags": [
          "WMSO",
          "Customer types"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Wmso\\Policies\\API\\ClientTypes\\ClientTypePolicy",
          "ability": "view",
          "privileges": [
            "wmso:support:clienttypes:list"
          ]
        },
        "x-visibility": "public",
        "responses": {
          "200": {
            "description": "Customer type list",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/suppliers/{supplier}": {
      "get": {
        "summary": "Get supplier",
        "description": "Returns supplier details by composite identifier (code.addressId). Includes name, NIF, contacts (email, mobile, phone), address and country code.",
        "tags": [
          "WMSO",
          "Suppliers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Wmso\\Policies\\API\\Entities\\SupplierPolicy",
          "ability": "view",
          "privileges": [
            "entidades:fornecedores:view"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "supplier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Supplier detail with address and contacts",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/stocks/check-diff/{warehouse}": {
      "get": {
        "summary": "Check stock differences",
        "description": "Compares WMSO stock quantities against ERP stock for a given warehouse. Returns articles with quantity discrepancies and associated employee notification emails.",
        "tags": [
          "WMSO",
          "Stocks"
        ],
        "x-visibility": "public",
        "parameters": [
          {
            "name": "warehouse",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stock differences and the employee emails to notify",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/wmso/users/warehouse": {
      "patch": {
        "summary": "Sync operator warehouse",
        "description": "Called by the WMS when an operator changes warehouse on the mobile app. Writes the store\n        on the employee record and clears the cached warehouse so the OfficeGest reflects the change immediately.\n        Idempotent: sending the warehouse the employee already has reports changed false without writing.",
        "tags": [
          "WMSO",
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Wmso\\Policies\\API\\Users\\WarehousePolicy",
          "ability": "update",
          "privileges": [
            "entidades:empregados:edit"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "external_id": {
                    "type": "integer",
                    "description": "Employee code (empreg.CodEmpr) the WMS keeps as users.external_id.",
                    "example": 4521
                  },
                  "warehouse_code": {
                    "type": "integer",
                    "description": "Store code (lojas.CodLoja) the operator moved to. Must belong to an active store.",
                    "example": 12
                  },
                  "source": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 32,
                    "description": "Origin of the change on the WMS side.",
                    "example": "WMS_QR_CODE"
                  },
                  "changed_at": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 40,
                    "description": "When the operator changed warehouse, ISO-8601.",
                    "example": "2026-08-03T14:22:10+01:00"
                  }
                },
                "required": [
                  "external_id",
                  "warehouse_code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Warehouse synchronized",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/interventions": {
      "get": {
        "summary": "List interventions",
        "description": "Returns a paginated list of workshop interventions with optional filtering.",
        "tags": [
          "Workshop",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Intervention\\Policies\\InterventionPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:apoio:intervencao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "vat_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "department_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "estimated_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[estimated_time][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[estimated_time][gte]=value",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InterventionOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create intervention",
        "description": "Creates a new workshop intervention.",
        "tags": [
          "Workshop",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Intervention\\Policies\\InterventionPolicy",
          "ability": "create",
          "privileges": [
            "oficinas:apoio:intervencao:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "estimated_time": {
                    "type": "number"
                  },
                  "value_without_vat": {
                    "type": "number"
                  },
                  "vat_id": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "depends_on": {
                    "type": "array",
                    "nullable": true
                  },
                  "is_splittable": {
                    "type": "boolean"
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "description",
                  "estimated_time"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InterventionOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/brands": {
      "get": {
        "summary": "List vehicle brands",
        "description": "Returns a list of vehicle brands with optional filtering.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Brands"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:marcas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_component",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleBrandDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create vehicle brand",
        "description": "Creates a new vehicle brand.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Brands"
        ],
        "x-permissions": {
          "ability": "create",
          "privileges": [
            "oficinas:apoio:marcas:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "is_component": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleBrandDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/models": {
      "get": {
        "summary": "List vehicle models",
        "description": "Returns a list of vehicle models with optional filtering.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Models"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:modelos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand_id",
            "in": "query",
            "required": false,
            "description": "Filter by brand ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "is_component",
            "in": "query",
            "required": false,
            "description": "Filter by component flag.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Filter by active status.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters (name, created_at, updated_at).",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleModelDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create vehicle model",
        "description": "Creates a new vehicle model.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Models"
        ],
        "x-permissions": {
          "ability": "create",
          "privileges": [
            "oficinas:apoio:modelos:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Model name."
                  },
                  "brand_id": {
                    "type": "integer",
                    "description": "Brand ID."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the model is active."
                  },
                  "is_component": {
                    "type": "boolean",
                    "description": "Whether this is a component model (ECOAUTO module)."
                  }
                },
                "required": [
                  "name",
                  "brand_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleModelDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/versions": {
      "get": {
        "summary": "List vehicle versions",
        "description": "Returns a list of vehicle versions with optional filtering.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Versions"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:versoes"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model_id",
            "in": "query",
            "required": false,
            "description": "Filter by model ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "is_component",
            "in": "query",
            "required": false,
            "description": "Filter by component flag.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "description": "Filter by active status.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "vin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "engine",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "ktype",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "date_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "date_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[vin][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[vin][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[engine][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[engine][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[ktype][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[ktype][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[date_start][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[date_start][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[date_end][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[date_end][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Advanced filters (name, vin, engine, ktype, date_start, date_end, created_at, updated_at).",
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleVersionDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create vehicle version",
        "description": "Creates a new vehicle version.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Versions"
        ],
        "x-permissions": {
          "ability": "create",
          "privileges": [
            "oficinas:apoio:versoes:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Version name."
                  },
                  "model_id": {
                    "type": "integer",
                    "description": "Model ID."
                  },
                  "date_start": {
                    "type": "string",
                    "format": "date",
                    "description": "Production start date."
                  },
                  "date_end": {
                    "type": "string",
                    "format": "date",
                    "description": "Production end date."
                  },
                  "vin": {
                    "type": "string",
                    "description": "VIN pattern."
                  },
                  "engine": {
                    "type": "string",
                    "description": "Engine specification."
                  },
                  "ktype": {
                    "type": "string",
                    "description": "TecDoc KType number."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the version is active."
                  },
                  "is_component": {
                    "type": "boolean",
                    "description": "Whether this is a component version (ECOAUTO module)."
                  }
                },
                "required": [
                  "name",
                  "model_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleVersionDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/fuels": {
      "get": {
        "summary": "List fuel types",
        "description": "Returns a list of vehicle fuel types with optional filtering.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Fuel Types"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:combustiveis"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "created_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[created_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[created_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[updated_at][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: gte, lte, eq. Example: filter[updated_at][gte]=value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VehicleFuelDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create fuel type",
        "description": "Creates a new vehicle fuel type.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Fuel Types"
        ],
        "x-permissions": {
          "ability": "create",
          "privileges": [
            "oficinas:apoio:combustiveis:new"
          ]
        },
        "x-visibility": "public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleFuelDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/interventions/suggestions": {
      "get": {
        "summary": "List intervention suggestions",
        "description": "Returns intervention suggestions based on search criteria.",
        "tags": [
          "Workshop",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Intervention\\Policies\\InterventionPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:apoio:intervencao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "filter[description][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[description][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InterventionOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/interventions/{id}": {
      "get": {
        "summary": "Show intervention",
        "description": "Returns a single intervention by its identifier.",
        "tags": [
          "Workshop",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Intervention\\Policies\\InterventionPolicy",
          "ability": "view",
          "privileges": [
            "oficinas:apoio:intervencao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InterventionOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update intervention",
        "description": "Updates an existing workshop intervention.",
        "tags": [
          "Workshop",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Intervention\\Policies\\InterventionPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:apoio:intervencao:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "estimated_time": {
                    "type": "number"
                  },
                  "value_without_vat": {
                    "type": "number"
                  },
                  "vat_id": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "depends_on": {
                    "type": "array",
                    "nullable": true
                  },
                  "is_splittable": {
                    "type": "boolean"
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InterventionOutputDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/brands/{id}": {
      "get": {
        "summary": "Show vehicle brand",
        "description": "Returns a single vehicle brand by its identifier.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Brands"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:marcas"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleBrandDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update vehicle brand",
        "description": "Updates an existing vehicle brand.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Brands"
        ],
        "x-permissions": {
          "ability": "update",
          "privileges": [
            "oficinas:apoio:marcas:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "is_component": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleBrandDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/models/{id}": {
      "get": {
        "summary": "Show vehicle model",
        "description": "Returns a single vehicle model by its identifier.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Models"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:modelos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleModelDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update vehicle model",
        "description": "Updates an existing vehicle model.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Models"
        ],
        "x-permissions": {
          "ability": "update",
          "privileges": [
            "oficinas:apoio:modelos:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Model name."
                  },
                  "brand_id": {
                    "type": "integer",
                    "description": "Brand ID."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the model is active."
                  },
                  "is_component": {
                    "type": "boolean",
                    "description": "Whether this is a component model (ECOAUTO module)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleModelDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/versions/{id}": {
      "get": {
        "summary": "Show vehicle version",
        "description": "Returns a single vehicle version by its identifier.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Versions"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:versoes"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleVersionDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update vehicle version",
        "description": "Updates an existing vehicle version.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Versions"
        ],
        "x-permissions": {
          "ability": "update",
          "privileges": [
            "oficinas:apoio:versoes:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Version name."
                  },
                  "model_id": {
                    "type": "integer",
                    "description": "Model ID."
                  },
                  "date_start": {
                    "type": "string",
                    "format": "date",
                    "description": "Production start date."
                  },
                  "date_end": {
                    "type": "string",
                    "format": "date",
                    "description": "Production end date."
                  },
                  "vin": {
                    "type": "string",
                    "description": "VIN pattern."
                  },
                  "engine": {
                    "type": "string",
                    "description": "Engine specification."
                  },
                  "ktype": {
                    "type": "string",
                    "description": "TecDoc KType number."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Whether the version is active."
                  },
                  "is_component": {
                    "type": "boolean",
                    "description": "Whether this is a component version (ECOAUTO module)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleVersionDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/fuels/{id}": {
      "get": {
        "summary": "Show fuel type",
        "description": "Returns a single vehicle fuel type by its identifier.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Fuel Types"
        ],
        "x-permissions": {
          "ability": "view",
          "privileges": [
            "oficinas:apoio:combustiveis"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleFuelDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update fuel type",
        "description": "Updates an existing vehicle fuel type.",
        "tags": [
          "Workshop",
          "Vehicle Support",
          "Fuel Types"
        ],
        "x-permissions": {
          "ability": "update",
          "privileges": [
            "oficinas:apoio:combustiveis:edit"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VehicleFuelDTO"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/mechanics": {
      "get": {
        "summary": "List workshop mechanics",
        "description": "Returns active employees flagged as mechanics (Paineis contains MECANICOS).",
        "tags": [
          "Workshop",
          "Mechanics"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\Mechanic\\Policies\\MechanicPolicy",
          "ability": "viewAny",
          "privileges": [
            "oficinas:apoio:tecnicos"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "series",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "department_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "deprecated": true
          },
          {
            "name": "filter[name][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: sw, ew, ct, eq. Example: filter[name][sw]=value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter[department_id][operator]",
            "in": "query",
            "required": false,
            "description": "Operators: eq, in. Example: filter[department_id][eq]=value",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number. Default 1; a value below 1 counts as 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page. Default 50, maximum 250; a larger value is truncated to 250.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Oficinas__MechanicOutputDTO"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            },
            "x-pagination": "simple",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/interventions/{sequence}/complete": {
      "patch": {
        "summary": "Mark service order intervention as completed",
        "description": "Sets is_executed=true; closes mechanic hours and recalculates totalhoras when GestaoTempos=INT.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderInterventionPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:apoio:intervencao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sequence",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mechanic_id": {
                    "type": "integer",
                    "description": "Mechanic that completed the intervention; defaults to authenticated employee."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderInterventionDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    },
    "/workshop/service-orders/{serviceOrder}/interventions/{sequence}/uncomplete": {
      "patch": {
        "summary": "Mark service order intervention as pending",
        "description": "Sets is_executed=false; reopens mechanic hours and may regress order status when GestaoTempos=INT.",
        "tags": [
          "Workshop",
          "Service Orders",
          "Interventions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-permissions": {
          "policy": "Og\\Modules\\Oficinas\\ServiceOrder\\Policies\\ServiceOrderInterventionPolicy",
          "ability": "update",
          "privileges": [
            "oficinas:apoio:intervencao"
          ]
        },
        "x-visibility": "public",
        "parameters": [
          {
            "name": "serviceOrder",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sequence",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceOrderInterventionDTO"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (data.code RATE_LIMITED). The per-minute limit sends Retry-After and the X-RateLimit-* headers; the monthly limit sends only Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              },
              "X-Trace-Id": {
                "$ref": "#/components/headers/X-Trace-Id"
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Tickets"
    },
    {
      "name": "CRM Parameters",
      "description": "CRM module configuration parameters"
    },
    {
      "name": "Workshop Agenda Settings",
      "description": "User-level calendar display preferences API"
    },
    {
      "name": "Crm",
      "description": "CRM tasks of the authenticated employee"
    },
    {
      "name": "Workshop Parameters",
      "description": "Workshop module parameters API"
    },
    {
      "name": "Appointment Categories",
      "description": "Manage appointment categories for CRM scheduling"
    },
    {
      "name": "Hotel",
      "description": "Hotel room, bed, service and monthly plan status"
    },
    {
      "name": "Stocks",
      "description": "Articles (products/items) management - CRUD, stock, pricing, and related data"
    },
    {
      "name": "Workshop Appointments",
      "description": "Workshop appointments and calendar events API"
    },
    {
      "name": "Sales",
      "description": "Sales document action log tracking API"
    },
    {
      "name": "Dashboards",
      "description": "OGMF dashboard layouts"
    },
    {
      "name": "Sessions",
      "description": "Active sessions and force logout"
    },
    {
      "name": "News",
      "description": "OfficeGest news feed"
    },
    {
      "name": "Banks",
      "description": "Banking reporting API"
    },
    {
      "name": "Cost Centers"
    },
    {
      "name": "Customers",
      "description": "Customer management API for entities"
    },
    {
      "name": "Franchise",
      "description": "Franchise connection management API"
    },
    {
      "name": "Utils",
      "description": "Utilities"
    },
    {
      "name": "DMS",
      "description": "Supplier invoice OCR APIs"
    },
    {
      "name": "Entities",
      "description": "Generic entity operations"
    },
    {
      "name": "Parameters",
      "description": "Tenant configuration parameters across every module"
    },
    {
      "name": "AMS Parameters",
      "description": "AMS Parameters configuration parameters"
    },
    {
      "name": "Accounting Parameters",
      "description": "Accounting module configuration parameters"
    },
    {
      "name": "Articles"
    },
    {
      "name": "Attachment Categories",
      "description": "Attachment category management APIs"
    },
    {
      "name": "Attachments",
      "description": "Attachment management APIs"
    },
    {
      "name": "Authentication",
      "description": "API authentication and session management"
    },
    {
      "name": "Banks Parameters",
      "description": "Banks Parameters configuration parameters"
    },
    {
      "name": "CRM",
      "description": "Manage CRM appointments and scheduling"
    },
    {
      "name": "Contracts Parameters",
      "description": "Contracts Parameters configuration parameters"
    },
    {
      "name": "DMS Parameters",
      "description": "DMS Parameters configuration parameters"
    },
    {
      "name": "EVM"
    },
    {
      "name": "EcoAuto",
      "description": "EcoAuto photo gallery for processes and components"
    },
    {
      "name": "General Parameters",
      "description": "General module configuration parameters"
    },
    {
      "name": "Hotel Parameters",
      "description": "Hotel Parameters configuration parameters"
    },
    {
      "name": "Human Resources",
      "description": "Employee absence management"
    },
    {
      "name": "Human Resources Parameters",
      "description": "Human Resources module configuration parameters"
    },
    {
      "name": "Maintenance Parameters",
      "description": "Maintenance Parameters configuration parameters"
    },
    {
      "name": "Marketplaces Parameters",
      "description": "Marketplaces Parameters configuration parameters"
    },
    {
      "name": "Payments Parameters",
      "description": "Payments Parameters configuration parameters"
    },
    {
      "name": "Project Work Parameters",
      "description": "Project Work Parameters configuration parameters"
    },
    {
      "name": "Prospects"
    },
    {
      "name": "Purchases",
      "description": "Purchase draft management"
    },
    {
      "name": "Purchases Parameters",
      "description": "Purchases module configuration parameters"
    },
    {
      "name": "RWM",
      "description": "Return and warranty processes for customers and suppliers"
    },
    {
      "name": "Retail Parameters",
      "description": "Retail Parameters configuration parameters"
    },
    {
      "name": "Sales Parameters",
      "description": "Sales module configuration parameters"
    },
    {
      "name": "Sellers"
    },
    {
      "name": "Social",
      "description": "Social care reporting API"
    },
    {
      "name": "Social Parameters",
      "description": "Social Parameters configuration parameters"
    },
    {
      "name": "Stocks Parameters",
      "description": "Stocks module configuration parameters"
    },
    {
      "name": "Subscriptions Parameters",
      "description": "Subscriptions Parameters configuration parameters"
    },
    {
      "name": "Suppliers"
    },
    {
      "name": "Tables",
      "description": "Document series management"
    },
    {
      "name": "Tickets Parameters",
      "description": "Tickets Parameters configuration parameters"
    },
    {
      "name": "Verticals Parameters",
      "description": "Verticals Parameters configuration parameters"
    },
    {
      "name": "WMS Parameters",
      "description": "WMS Parameters configuration parameters"
    },
    {
      "name": "WMSO",
      "description": "WMSO document process status management"
    },
    {
      "name": "Workshop",
      "description": "Workshop intervention management"
    }
  ]
}
